Interleukins are critical cytokines that are ubiquitously present in both vertebrates and invertebrates and constitute the front line of host innate immunity. Here, we identified and analyzed IL-12p40 from the Chinese sea bass Lateolabrax maculatus (LmIL-12p40). The LmIL-12p40 gene is expressed as a 1386-base pair transcript that encodes a polypeptide of 321 amino acids. Transcriptional expression analysis indicated that LmIL-12p40 mRNA was ubiquitously expressed in all tested tissues and had a comparatively high expression level in immune-associated tissues (head-kidney and intestines). Quantitative reverse-transcriptase polymerase chain reaction (qRT-PCR) experiments showed that, after Vibro harveyi and Streptococus agalactiae infection, LmIL-12p40 mRNA expression was significantly up-regulated in the spleen, liver and head-kidney. To further clarify the immune function of LmIL-12p40 after bacterial challenge, the recombinant LmIL-12p40 protein was acquired using a prokaryotic expression method. Furthermore, the LmIL-12p40 dimer (LmIL-12p80) could be produced via protein–protein interactions by incubating p40 monomer expressed from the pET28a vector (pET28a-LmIL-12p40) with p40 monomer expressed from the pGEX4T-1 vector (pGEX4T-1-LmIL-12p40). The antimicrobial activity of the purified LmIL-12p40 and LmIL-12p80 proteins were further studied in vitro using a bacterial growth inhibition test (for both liquid and solid cultures) and in vivo (using a bacterial growth inhibition test with the head-kidney tissues). Furthermore, BL21 (DE3) E. coli cells transformed with the recombinant pET28a-LmIL-12p40 vector were dramatically protected in response to metal toxicity and H2O2-related oxidative stress. In summary, this study will provide foundational information regarding the role of LmIL-12p40 in defending against various biotic and abiotic stresses in fishes, which should help to further clarify the functional mechanism of interleukins.