Epigallocatechin-3-gallate (EGCG), a flavoured and healthy compounds in tea, is affected by the ecological factors. However, the biosynthetic mechanisms of EGCG in response to the ecological factors remian unclear. In this study, a response surface method with a Box-Behnken design was used to investigate the relationship between EGCG accumulation and ecological factors; further, integrative transcriptome and metabolome analyses were performed to explore the mechanism underlying EGCG biosynthesis in response to environmental factors. The optimal environmental conditions obtained for EGCG biosynthesis were as follows: 28℃, 70 % relative humidity of the substrate, and 280 µmol·m−2·s−1 light intensity; the EGCG content was increased by 86.83 % compared to the control (CK1). Meanwhile, the order of EGCG content in response to the interaction of ecological factors was as follows: interaction of temperature and light intensity > interaction of temperature and relative humidity of the substrate > interaction of light intensity and relative humidity of the substrate, indicating that temperature was the dominant ecological factors. EGCG biosynthesis in tea plants was found to be comprehensively regulated by a series of structural genes (CsANS, CsF3H, CsCHI, CsCHS, and CsaroDE), miRNAs (miR164, miR396d, miR5264, miR166a, miR171d, miR529, miR396a, miR169, miR7814, miR3444b, and miR5240), and transcription factors (MYB93, NAC2, NAC6, NAC43, WRK24, bHLH30, and WRK70); further, the metabolic flux was regulated and converted from phenolic acid to the flavonoid biosynthesis pathway based on accelerated consumption of phosphoenolpyruvic acid, d-erythrose-4-phosphate, and l-phenylalanine in response to ambient changes in temperature and light intensity. Overall, the results of this study reveal the effect of ecological factors on EGCG biosynthesis in tea plants, providing novel insights for improving tea quality.