Introduction: X-linked hyper-IgM syndrome is a type of primary combined immunodeficiency disorder caused by mutations in CD40 ligand. Opportunistic infections caused by P jirovecii, cytomegalovirus (CMV), or fungi are frequently the first presenting symptom of the patients with X-linked hyper-IgM syndrome. Patient concerns: Here, we report a 10-month-old infant who presented with cyanosis and shortness of breath. The infant exhibited no medical or birth history indicating a primary immune deficiency and was first diagnosed with interstitial pneumonia and acute respiratory failure on admission. Diagnoses: The infant was diagnosed with Pneumocystis jirovecii pneumonia combined with CMV and fungal infection through gene sequencing by nasopharyngeal swab and G-test. Whole-exome sequencing from a blood sample was performed and identified a functional mutation across the CD40 ligand gene (NM_000074;exon1;C.86_87del) resulting in an amino acid change (P.T29Sfl∗18) attributed to X-linked hyper IgM syndrome. Interventions: The infant received continuous positive airway pressure ventilation treatment combined with trimethoprim-sulfamethoxazole for Pneumocystis jirovecii pneumonia, ganciclovir for CMV, voriconazole for fungal infection and substitution of high-dose immunoglobulin. Outcomes: Six months after discharge from our hospital, the infant remained well. Conclusion: Opportunistic infections should be suspected in infants presenting with severe interstitial pneumonia. Primary immune deficiency diseases should also be considered in infants diagnosed with opportunistic infections.