The yellow drum (Nibea albiflora) is a marine teleost fish with strong disease resistance, yet the understanding of its immune response and key functional genes is fragmented. Here, RNA-Seq was used to investigate the regulation pathways and genes involved in the immune response to infection with lipopolysaccharide (LPS) and polyinosinic-polycytidylic acid (poly (I:C)) on the spleen of the yellow drum. There were fewer differentially expressed genes (DEGs) in the LPS-infected treatment group at either 6 or 48 h. Kyoto Encyclopedia of Genes and Genomes (KEGG) analysis showed that these DEGs were mainly significantly enriched in c5-branching dibasic acid metabolic and complement and coagulation cascades pathways. The yellow drum responded more strongly to poly (I:C) infection, with 185 and 521 DEGs obtained under 6 and 48 h treatments, respectively. These DEGs were significantly enriched in the Toll-like receptor signaling pathway, RIG-I-like receptor signaling pathway, Jak-STAT signaling pathway, NOD-like signaling pathway, and cytokine–cytokine receptor interaction. The key functional genes in these pathways played important roles in the immune response and maintenance of immune system homeostasis in the yellow drum. Weighted gene co-expression network analysis (WGCNA) revealed several important hub genes. Although the functions of some genes have not been confirmed, our study still provides significant information for further investigation of the immune system of the yellow drum.