Hypericin and hyperforin are the most important secondary metabolites of Hypericum perforatum, which are fundamentally effective and useful in treating depression. However, the biosynthetic pathways of such important compounds have not been well recognized. In this research, RNA-seq data of H. perforatum were obtained from the European nucleotide archive (ENA) of EMBL-EBI and then WGCNA (weighted correlation network analysis) package in R was utilized to analyze the hypericin and hyperforin biosynthesis gene networks to identify the most effective genes in the biosynthetic pathway of these metabolites. Furthermore, the foliar application of different methyl jasmonate concentrations including zero (control), 200 μM and 500 μM was performed on H. perforatum. Then, the content of total phenol, flavonoids, hypericin and hyperforin were measured at 12, 24, 48 and 72 h, 7 and 14 days after treatment. The results showed that the highest content of total phenol and flavonoid were observed at the concentration of 500 μM of MeJA at 14 days after spraying, while the highest content of hypericin and hyperforin was accumulated at 200 μM of MeJA after treatment for 14 days. Moreover, qRT-PCR experiment analysis showed that the expression of several transcripts including polyketides synthase 2 (DN112064_c2_g1_i2), dof zinc finger (DN123509_c0_g1_i2), MYB-related 308 (DN118134_c3_g1_i2), geranylgeranyl pyrophosphate (DN125559_c3_g3_i5) and polyketides synthase 1 (DN126440_c0_g1_i2) were upregulated after spraying 200 μM of MeJA.