N6-methyladenosine (m6A) is a prevalent RNA modification involved in different physiological and pathological processes. However, little is known about the role of m6A modification in endometrial cancer (EC). In this study, we explored the expression and prognosis of m6A-related genes in EC using public databases to screen relevantgenes. Quantitative reverse-transcription PCR and immunohistochemistry were performed to detect YTH N6-methyladenosine RNA binding protein C2 (YTHDC2) expression in EC tissues, and the relationships between YTHDC2 expression, pathological features, and prognosis were analyzed. The effect of YTHDC2 on EC cells and its mechanism of action were examined in vitro and in vivo. YTHDC2 was identified as a tumor suppressor gene in EC. Expression of YTHDC2 mRNA and protein was significantly lower in EC tissues than in normal tissues. YTHDC2 expression was related to myometrial invasion (χ2=7.523, P = 0.006), lymph node metastasis (χ2=7.203, P = 0.007), and FIGO stage (χ2=9.678, P = 0.008) in EC. It was also a prognostic factor in EC (95 %CI: 1.217-3.646, P = 0.013), and patients with EC low YTHDC2 expression had poor overall survival. YTHDC2 knockdown promoted the proliferation, migration, and invasion of EC cells, and decreased apoptosis. Upregulation of YTHDC2 showed the opposite effects. YTHDC2 inhibited the Hedgehog signaling pathway, and the Hedgehog inhibitor vismodegib partly eliminated the effects of YTHDC2 knockdown of EC cells. YTHDC2 inhibited EC progression and has the potential to be explored as an independent prognostic factor in patients with EC.