The middle Miocene Climate Optimum (MMCO) was the warmest interval of the last 23 million years and is one of the best analogs for proposed future climate change scenarios. Fungi play a key role in the terrestrial carbon cycle as dominant decomposers of plant debris, and through their interactions with plants and other organisms as symbionts, parasites, and endobionts. Thus, their study in the fossil record, especially during the MMCO, is essential to better understand biodiversity changes and terrestrial carbon cycle dynamics in past analogous environments, as well as to model future ecological and climatic scenarios. The fossil record also offers a unique long-term, large-scale dataset to evaluate fungal assemblage dynamics across long temporal and spatial scales, providing a better understanding of how ecological factors influenced assemblage development through time. In this study, we assessed the fungal diversity and community composition recorded in two geological sections from the middle Miocene from the coal mines of Thailand and Slovakia. We used presence-absence data to quantify the fungal diversity of each locality. Spores and other fungal remains were identified to modern taxa whenever possible; laboratory codes and fossil names were used when this correlation was not possible. This study represents the first of its kind for Thailand, and it expands existing work from Slovakia. Our results indicate a total of 281 morphotaxa. This work will allow us to use modern ecological data to make inferences about ecosystem characteristics and community dynamics for the studied regions. It opens new horizons for the study of past fungal diversity based on modern fungal ecological analyses. It also sheds light on how global variations in fungal species richness and community composition were affected by different climatic conditions and under rapid increases of temperature in the past to make inferences for the near climatic future.