A hysterectomy is the primary treatment for endometrial cancer. It involves the removal of the uterus and cervix and possibly the ovaries and fallopian tubes, depending on the cancer stage and type.