<p><strong>Introduction: </strong>Recent evidence shows that there is an increase in the incidence of pulmonary mycosis globally. In clinical settings, pulmonary mycosis is commonly misdiagnosed as pulmonary tuberculosis (PTB). Identifying risk factors can ease the diagnosis of pulmonary mycosis. This study aimed to determine the risk factors for pulmonary mycosis in immunocompromised patients in Surakarta.</p><p><strong>Methods: </strong>This was an analytic observational study with a retrospective cohort study method. This study used purposive sampling technique on 218 medical records of immunocompromised patients during January 2019–September 2022 at a referral hospital in Surakarta. The correlation of sociodemographic, health status, health behavior, history of diseases, medications, and transplantations with the incidence of pulmonary mycosis was analyzed using Chi-Square test or Fisher’s exact test as its alternative.</p><p><strong>Results: </strong>There was a significant correlation between educational level (p=0.018), nutritional status (p=0.001), smoking habit (p=0.000), history of corticosteroid use (p=0.031), history of antibiotic use (p=0.006), history of chemotherapy (p=0.003), history of PTB (p=0.047), and history of chronic obstructive pulmonary disease (COPD) (p=0.001) with the incidence of pulmonary mycosis. Meanwhile, there was no significant correlation between occupation (p=0.057), neutrophil level (p=1.000), history of human immunodeficiency virus (HIV) infection (p=1.000), history of diabetes mellitus (DM) (p=0.070), and history of organ transplantation (p=1.000) with the incidence of pulmonary mycosis.</p><strong>Conclusion: </strong>Low educational level, malnutrition, smoking habit, history of pulmonary diseases, and medications are the risk factors for pulmonary mycosis in immunocompromised patients in Surakarta. It is important to identify these risk factors when examining patients with respiratory disorder symptoms.