The fungi Metarhizium anisopliae and Trichoderma harzianum are important biocontrol agents and play a pivotal role in insect pests and plant pathogens control. They can also promote plant growth and survival in plants as endophytes. However, the endogenous mechanism is still unclear and needs further studies. Here in the current study, we analyzed the transcriptomic changes in the response of peanut roots inoculated with the two fungi for 4 days. The two transcriptomic data revealed 119 and 856 differentially expressed genes (DEGs) which were respectively induced by M. anisopliae and T. harzianum in inoculated peanut roots. KEGG library showed the DEGs from M. anisopliae treatment were scattered in diverse pathways, whereas the DEGs from T. harzianum treatment were top enriched in phenylpropanoid biosynthesis and plant-pathogen interaction pathways. Furthermore, there were 76 shared DEGs under the induction of two fungi, which were highly enriched in stress-resistant pathways including hormone signal transduction, linolenic acid metabolism, and phenylpropanoid biosynthesis. Independently, 43 DEGs were specifically induced by M. anisopliae which is mainly involved in plant defense, stress-resistant response and cell nutrition, whereas 780 DEGs were specifically induced by T. harzianum which were top enriched in plant-pathogen interaction, hormone signal transduction and phenylpropanoid biosynthesis. 11 genes in mentioned pathways were selected for RT-qPCR analysis which was almost consistent with transcriptomic data. Findings suggested that both M. anisopliae and T. harzianum can up-regulate the transcription levels of abscisic acid receptors, ethylene transcription factors, and linolenic acid metabolism genes to regulate hormone signal transduction pathways and linolenic acid metabolism pathways for successful penetration or colonization. Differently, T. harzianum mainly strengthened the inhibition of the plant immune response and induction of plant system disease resistance, while M. anisopliae slightly weakened the immune response but multi-regulated pathways for nutritional transport and metabolism, especially in nitrogen and iron ion supply for symbiotic initiation.