In order to explore the effect of ecological factors on the content of active ingredients and to promote the effective utilization and ecological planting of Gardenia jasminoides, we determined the contents of geniposide and crocin in Yuzhi No.1 clonal fruit from 10 experimental sites by HPLC (high performance liquid chromatography). At the same time, we analyzed the effects of ecological division on the accumulation of geniposide and crocin by using orthogonal partial least squares regression model (OPLS). The results showed that the contents of geniposide and crocin in G. jasminoides fruit were significantly different in different ecological environments. The main factors affecting the accumulation of geniposide were organic matter, average temperature in July, relative humidity and annual average temperature; the organic matter and relative humidity were positively correlated with the geniposide content, while the average temperature in July and annual average temperature were negatively correlated with the content of geniposide. Potassium, active accumulated temperature and annual sunshine duration were the main factors affecting the accumulation of crocin, and the content of crocin was positively correlated with active accumulated temperature, while it was negatively correlated with potassium and annual sunshine duration. The result showed that the difference in ecological environment will lead to the change of the content of active components in G. jasminoides, which will affect the quality of medicinal materials. In the process of Gardenia cultivation, we can take organic matter, average temperature in July, relative humidity, annual average temperature, potassium, active accumulated temperature and annual sunshine duration as reference indexes for selecting high-quality production areas.