The distribution of steroids in the lichen Cladonia rangiferina, which is a common species in peatlands, and the steroid derivatives generated by diagenetic processes were investigated by simulated thermal maturation experiments. In living samples, C28 sterols such as brassicasterol and ergosterol were mainly identified. Other C28 sterols, including dehydroergosterol and campesterol, and C29 sterols, such as stigmasterol and β-sitosterol, were detected as minor components. Some of these steroids were thought to be derived from symbiotic algae. We also detected acetylated steroids that were possibly derived from fungi. Sterenes, aromatic steroids, and diasterenes were identified in thermal maturation experiments. Maximal yields of C28 monoaromatic anthrasteroids and C28 cyclosteroids were from samples with short heating times of 3 h and 6 h, respectively, indicating that they were generated at an early stage of diagenesis. The yields of C28 cyclosteroids also increased with heating of samples for longer times (48–72 h). However, the time courses of changes in levels of C29 homologs had different trends, with no significant increases observed during the heating period. A variety of C28 cyclosteroids and anthrasteroids were detected among the products in the heated samples, which were thought to be derived from ergosterol and its isomers. These observations imply the diversity of these precursors in lichens and/or the existence of different chemical forms (free or bound). This study provides new insights into the origins of C28 cyclosteroids and anthrasteroids in sediments, which can be used as indicators of the presence of ergosterol-producing fungi, including lichens.