Though she believed she was free of the disease, a month later, Dunham was rushed to the hospital for complications.
She wrote that she consoles herself with the belief that she has "choices", which include adoption.
Dunham has been vocal about her suffering.
While Dunham wrote that, physically, she recovered "like a champ", she also described her emotional roller-coaster. In other words: It can completely turn your life upside down.
Read the full story via the Endometriosis Foundation here. As you may know, Kim Kardashian had a baby through a surrogacy this year as well.
In endometriosis, tissue that normally lines the inside of the uterus grows outside it. Cysts, scarring, internal bleeding and organ adhesion can occur, causing pain and fertility problems.
CNN reported Dunham's essay is titled "The Painful Truth".
She's undergone multiple surgeries and was hospitalised several times for the condition.
Of course, she will now never have the option of having a natural birth if she ever decides to have children, but she's happy that there are still options available for her.
'I apologise weakly for what they are witnessing - someone who hurts too much to express themselves, who can't help but be a nuisance at best and a terror at worst'.
After "years of complex surgeries measuring in the double digits", Dunham finally concluded that the hysterectomy was necessary. "I often recommend a low-sugar, high-fiber and high-protein diet".
Lena Dunham talks about her decision to have a hysterectomy in the March issue of Vogue magazine.
Lena Dunham has revealed that she underwent a hysterectomy after a long battle with endometriosis. It's true: Even when the uterus is removed, remaining tissue or lesions on other organs can still cause inflammation and pain over time. Doctors do not always recognise it, assuming it is period pain. Another option, especially if pain is located in the center of the abdomen, is to sever pelvic nerves connected with the uterus through presacral neurectomy.
"I may have felt choiceless before, but I know I have choices now", she writes.
According to Dunham's endometriosis specialist, NY gynecological surgeon Dr. Dr. Ross tells us that: "Hysterectomy, with or without removal of the ovaries, is often the last resort for treating women with chronic and disruptive symptoms from severe endometriosis". "Even if I could get pregnant, there's nothing I can offer".