Michelle Kosilek, who was Robert Kosilek when he was convicted of killing his wife, Cheryl, in 1990, is suing to force the state to pay for the surgery.
Kosilek, who wore make-up and a woman's jumper to court on Thursday, described growing up feeling like a "circus freak" trapped in the wrong body. Kosilek broke down and sobbed when asked what would happen if state prison officials refused to allow the sex-change operation.
"I would not want to continue existing like this," said Kosilek, who has twice attempted suicide. "The greatest loss is the dying I do inside a little bit every day."
Kosilek, 57, is serving a life sentence at an all-male prison in Massachusetts. Kosilek sued the state's Department of Correction in 2000, claiming its refusal to provide the surgery violated the Eighth Amendment right against cruel and unusual punishment.
In 2002 a US District Court judge ruled Kosilek was entitled to receive medical treatment for gender identity disorder, but stopped short of ordering a sex-change operation.
Since the ruling, Kosilek has received female hormone treatment, laser hair removal and psychotherapy. Kosilek has also been given some access to female undergarments and make-up. "Just the hormones and the make-up do not get rid of my suffering," Kosilek said.
Prison officials said allowing Kosilek to have the sex-change operation could create security risks. If Kosilek returned as a woman to the all-male prison, she could be targeted for assault by male inmates, they said.
If she was transferred to a women's prison, she could pose a risk to female inmates.