Mogao Grottoes, a UNESCO World Cultural Heritage Site since 1987, suffers from microbial colonization and deterioration of the wall paintings with the visible appearance of black spots and microbial biomasses in selected caves. In this study, next-generation sequencing (NGS) and microscopy analyses were combined to reveal the microbial community composition responsible for the biodeterioration. Results of scanning electron microscope (SEM), fluorescence microscopy, and polarizing microscopy showed that the existing microbial hyphae related to biodeteriorations were inviable. The dominant bacteria included Rhodococcus and Ralstonia, while Aspergillus species were the predominant fungi in samples of the black spots and microbial biomasses. In addition, radioactive 14C dating was applied to determine the possible infestation time of the fungal outbreak based on Bayesian chronological modeling. The original mural was most likely painted in the Five Dynasties and Ten Kingdoms (939–942 ca. AD), while the repainting time of the mural was most probable during the Song Dynasty (1002–1014 ca. AD), and the microbial biomasses were most likely formed in this historical period. With monitoring locations closer to the cliff, the higher bacterial diversity and lower fungal diversity detected were correlated with the higher relative humidity. Since the temperature and relative humidity are generally low in this area, being unsuitable for microbial growth presently or in the normal time of the past, either earthen plaster preparation before painting or heavy rainfall events combined with a leaky roof were most likely the initiators of the outbreak of the indigenous microbes on the wall paintings. This study provides useful evidence concerning the microbial community and the timing of microbial outbreak events on ancient wall paintings in such extremely arid climate conditions.