An approximately 1-year-old male intact Shih Tzu dog was referred to a tertiary facility with a history of progressive tachypnea, increased respiratory effort, and weight loss over a 3-month period that failed to improve with empirical antimicrobial treatment. Upon completion of a comprehensive respiratory evaluation, the dog was diagnosed with severe Pneumocystis pneumonia and secondary pulmonary hypertension. Clinical signs resolved and disease resolution was confirmed after completion of an 8-week course of trimethoprim-sulfonamide, 4-week tapering dose of prednisone to decrease an inflammatory response secondary to acute die-off of organisms, a 2-week course of clopidogrel to prevent clot formation, and a 2-week course of a phosphodiesterase-5 inhibitor to treat pulmonary hypertension. Immunodiagnostic testing and genetic sequencing were performed to evaluate for potential immunodeficiency as an underlying cause for the development Pneumocystis pneumonia, and identified an X-linked CD40 ligand deficiency.