Abstract:[Objective] Gut fungal microorganisms play multiple roles in the life history of their hosts as indispensable part of gut microbiota. Although stag beetles are common saprophytic insects, little is known about their gut fungal community. In this study, we compared the structure and diversity of gut fungi at different developmental stages of the rainbow stag beetle, Phalacrognathus muelleri, aiming to reveal the characteristics of the fungi at different developmental stages of this insect. [Methods] We employed high-throughput sequencing (Illumina MiSeq) to study the gut fungal community structure in the newborn larvae, mature larvae, and adults of P. muelleri. Further, we analyzed alpha and beta diversity and carried out functional prediction for the fungi. [Results] The predominant fungal genera in the gut of P. muelleri were Candida, Phialocephala, Penicillium, and Lecythophora. The composition and diversity of the gut fungal community were significantly different between the larvae and adults, which may be associated with their different diets. The functional prediction showed that endosymbiotic fungi in the larval gut had higher diversity and relative abundance, suggesting that the larvae might depend more on the beneficial fungal taxa in the gut to obtain nutrients. The results of the abundance-based β-null deviation showed that the adult gut exerted a stronger filtering effect to select specific fungal taxa. Thus, the adults might build a more stable co-occurrence network of gut fungal community which supported them to adapt to the environmental fluctuations. [Conclusion] Different groups of functional fungi are involved in the food degradation of P. muelleri at different developmental stages. The larvae may depend more on gut fungi, and the adult gut has strong filtering effect to select specific groups of fungi and maintain the stability of the gut fungal community. Our study enhances our understanding of the gut microbiota of stag beetles, which can aid in the conservation and utilization of these saprophytic beetles as an important functional group in ecosystems.