BACKGROUND AND OBJECTIVES: Tropical karst forests are characterized by heterogeneous microhabitats with nutrient-poor calcareous soils and dynamic microclimatic fluctuations that regulate macrofungal communities. Across such extreme environments, the fungal genera Xylaria and Hygrocybe exhibit divergent ecological strategies, functioning respectively as lignicolous saprotrophs and edaphic specialists. The study objectives were to evaluate the influence of edaphic and microclimatic variables on the occurrence and niche differentiation of Hygrocybe and Xylaria assemblages in the Maros–Pangkep karst forest of South Sulawesi, Indonesia.METHODS: Macrofungal surveys and simultaneous environmental measurements were conducted across representative karst habitat transects. The analyzed edaphic parameters comprised soil potential of hydrogen, organic nitrogen, available phosphorus, exchangeable cations (calcium, magnesium, potassium and sodium), cation exchange capacity, base saturation, soil temperature, and soil moisture. The microclimatic parameters monitored included air temperature, relative humidity, and canopy light intensity. Principal Component Analysis was employed to determine multivariate environmental gradients, and Spearman’s rank correlation analysis was applied to assess relationships between fungal abundance and individual environmental parameters.FINDINGS: Eight macrofungal taxa were identified, comprising five Xylaria species (Xylaria longipes, Xylaria longiana, Xylaria hypoxylon, Xylaria furcata, and Xylaria polymorpha) and three Hygrocybe species (Hygrocybe miniata, Hygrocybe flavescens, and Hygrocybe reesiae). All Xylaria specimens, sampled across nine plots, were exclusively associated with decaying coarse woody debris, whereas every Hygrocybe specimens, recorded from five plots, was restricted to mineral soils substrates. Principal Component Analysis showed Xylaria occurrence aligned mainly with microclimatic gradients, explaining about ninety two percent of total variance, while Hygrocybe was more closely linked to soil chemical properties, explaining about eighty four percent of total variance. Spearman's rank correlation analyses revealed no statistically significant relationship between measured environmental parameter and Xylaria abundance. This pattern aligns with its established dependence on woody substrates, although specific substrate characteristics were not directly quantified. Hygrocybe abundance exhibited a nominally significant negative correlation with cation exchange capacity, aligning with an apparent affinity for nutrient-deficient substrates; however, this relationship warrants cautious interpretation owing to the limited sample size. CONCLUSION: Microclimatic conditions and soil chemical properties potentially act in synergy to drive macrofungal niche differentiation in tropical karst forests. These findings establish critical baseline ecological indicators essential for biodiversity monitoring, habitat conservation, and the sustainable management of vulnerable karst ecosystems.