The drilling of the Rio Tinto basement has provided evidence of an underground microbial community primarily sustained by the Fe and S metabolism through the biooxidation of pyrite orebodies. Although the gossan is the microbial activity product, which dates back to the Oligocene (25 Ma), no molecular evidence of such activity in the past has been reported yet. A Time of Flight Secondary Ion Mass Spectrometry (ToF-SIMS) molecular analysis of a subsurface sample in the Peña de Hierro basement has provided novel data of the ancient underground microbial community. It shows that the microbial remains are preserved in a mineral matrix composed of laminated Fe-oxysulfates and K- and Na-bearing sulfates alternating with secondary silica. In such a mineral substrate, the biomolecule traces are found in five different microstructure associations, (1) <15 micron-sized nodular microstructures composed of POn(2≤n≤4)−, (2) <30 micron-size micronodules containing fatty acids, acylglycerides, and alkanol chains, (3) <20 micro-sized nodules containing NOn−(2≤n≤3) ions, (4) 40-micron size nodules with NH4+ and traces of peptides, and (5) >200-micron thick layer with N-bearing adducts, and sphingolipid and/or peptide traces. It suggests the mineralization of at least five microbial preserved entities with different metabolic capabilities, including: (1) Acidiphilium/Tessaracoccus-like phosphate mineralizers, (2) microbial patches preserving phosphate-free acylglycerides bacteria, (3) nitrogen oxidizing bacteria (e.g., Acidovorax sp.), (4) traces of heterotrophic ammonifying bacteria, and (5) sphingolipid bearing bacteria (e.g., Sphingomonadales, and δ-Proteobacteria) and/or mineralized biofilms. The primary biooxidation process acted as a preservation mechanism to release the inorganic ions that ultimately mineralized the microbial structures.