We herein report the case of a 44-year-old man who was diagnosed with pneumocystis pneumonia (PCP) concomitant with ectopic adrenocorticotropic hormone (ACTH) syndrome, which had been caused by a large cell neuroendocrine carcinoma of the thymus. Chest computed tomography revealed ground-glass opacities in the lungs. PCP was diagnosed by a polymerase chain reaction with bronchoalveolar lavage. The levels of cortisol were slowly corrected with an adrenal enzyme inhibitor, and the exacerbation of PCP was successfully avoided. Our case indicates that in addition to prophylaxis, the early diagnosis of PCP and the slow correction of hypercortisolemia should be considered in order to prevent an exacerbation due to the reconstitution of the immune function in patients with ectopic ACTH syndrome.