Background Ovarian cancer has the highest mortality rate among gynecologic cancers, and most patients are diagnosed in advanced stages. Enhancer of zeste homolog 2 (EZH2) is a major tumor marker and an effective therapeutic target for ovarian cancer, but the underlying molecular mechanism remains unclear. The present study investigated the biological effects of EZH2 knockout in SKOV3 cells in vitro and in vivo and explored the molecular mechanism by integrated analysis of messenger RNA sequencing (mRNA-seq) and chromatin immunoprecipitation sequencing (ChIP-seq) data. Methods The CRISPR/Cas9 system was used to establish EZH2 knockout SKOV3 cells. Protein expression was evaluated by Western blotting. The effect of EZH2 on ovarian cancer was evaluated in vitro with MTT, wound healing, Transwell, and apoptosis assays and in vivo with a xenograft model. mRNA-seq and ChIP-seq were performed to explore the molecular mechanism underlying the biological function of EZH2. Immunohistochemical staining (IHC) of tissue arrays was used to analyze the correlations among EZH2 and CYP27B1 expressions and prognosis. Results We obtained three EZH2 knockout subclones. EZH2 knockout SKOV3 cells exhibited significantly suppressed proliferation, migration, and invasion and a significantly increased apoptosis rate. The subcutaneous tumor formation rate decreased from 100 to 0% in the EZH2 knockout group. Integrated analysis of the mRNA-seq and ChIP-seq data identified 1,455 significantly upregulated genes with matching downregulated trimethylation of histone H3 lysine 27 (H3K27me3) methylation binding sites in 1b11H cells compared to SKOV3 cells. The set of downregulated genes in EZH2 knockout cells was highly enriched in genes regulating the activation of steroid biosynthesis; the top-ranked hub gene was CYP27B1. The EZH2 and CYP27B1 expression levels showed a statistically significant inverse correlation, which was also associated with unfavorable prognosis. The in vitro experiment demonstrated that CYP27B1 can suppress the proliferation, migration, and invasion of ovarian cancer cells. Moreover, the levels of AKT and p-AKT were significantly increased, whereas STAT3 was downregulated, in 1b11H cells compared to SKOV3 cells. Moreover, STAT3 and AKT overexpression was observed in 1b11H siRNA for CYP27B1 (siCYP27B1) cells. Conclusion EZH2 plays an important role in promoting cell proliferation, migration, and invasion in ovarian cancer by regulating the core steroid biosynthesis gene via H3K27me3 methylation. Moreover, CYP27B1, the steroid biosynthesis hub gene, might be a novel therapeutic target for ovarian cancer.