Fairy rings resulting from a fungus−plant interaction appear worldwide. 2-Azahypoxanthine (AHX) and imidazole-4-carboxamide (ICA) were first isolated from the culture broth of one of the fairy ring-forming fungi, Lepista sordida. Afterward, a common metabolite of AHX in plants, 2-aza-8-oxohypoxanthine (AOH), was found in AHX-treated rice. The biosynthetic pathway of the three compounds that are named as fairy chemicals (FCs) in plants has been partially elucidated; however, that in mushrooms remains unknown. In this study, it was revealed that the carbon skeletons of AHX and ICA were constructed from Gly in L. sordida mycelia and the fungus metabolized 5-aminoimidazole-4-carboxamide (AICA) to both of the compounds. These results indicated that FCs were biosynthesized by a diversion of the purine metabolic pathway in L. sordida mycelia, similar to that in plants. Furthermore, we showed that recombinant adenine phosphoribosyltransferase (APRT) catalyzed reversible interconversion not only between 5aminoimidazole-4-carboxamide-1-β-D-ribofuranosyl 5′-monophosphate (AICAR) and AICA but also between ICA-ribotide (ICAR) and ICA. Furthermore, the presence of ICAR in L. sordida mycelia was proven for the first time by LC-MS/MS detection, and this study provided the first report that there was a novel metabolic pathway of ICA in which its ribotide was an intermediate in the fungus.