In this study, complementary DNA (cDNA) and DNA sequences of major histocompatibility complex (MHC) class IIB genes (mhcIIB) were cloned from orange-spotted grouper Epinephelus coioides. The gene structure of E. coioides mhcIIB consists of five exons and four introns, and its deduced amino acid sequence length is 249 amino acids, including a signal peptide, a peptide-binding region, an IGC1 domain, a transmembrane region and a cytoplasmic tail. A phylogenetic study showed that E. coioides mhcIIB shared 32·0–79·1% identity with those of other teleosts and mammals. Real-time reverse transcriptase (RT)-PCR was performed to detect the class IIB gene expression in eight different tissues. To characterize the relationship between E. coioides mhcIIB gene and pathogens, in vivo and in vitro studies were performed. Challenge of Cryptocaryon irritans revealed that class IIB genes were down-regulated after 24 and 48 h of challenge, and their expression was later restored at 72 h. Stimulation of isolated E. coioides leukocytes with lipopolysaccharide (LPS) and polyinosinic:polycytidylic acid (PolyI:C) significantly increased peripheral blood and spleen mhcIIB expression, while head kidney mhcIIB expression remained constant.