The justices did not comment in letting stand a lower-court ruling denying the surgery to Michelle Kosilek.
"This is a terrible and inhumane result for Michelle," said Jennifer Levi, director of the Transgender Rights Project for Boston-based Gay and Lesbian Advocates and Defenders.
The state Department of Correction, which has fought the surgery, did not immediately respond to a request to comment.
State prison officials, who say the surgery could cost as much as $50,000, have said in the past they opposed the surgery because it would create security problems.
Kosilek was known as Robert Kosilek when she was convicted of murdering her spouse, Cheryl, in 1990.
Kosilek, now 65, said in her legal fight against the state prisons department that her Eighth Amendment right against cruel and unusual punishment was being violated and the surgery is necessary to relieve the mental anguish caused by gender-identity disorder.
"The treatment of Michelle has been cruel and unusual, according to two lengthy, thoughtful, and closely reasoned judgments," Joseph Sulman, one of Kosilek's lawyers, said Monday. "The DOC's behaviour has been abominable as they have repeatedly defied their own experts in their eagerness to deny her desperately needed medical attention."
The prisons department initially provided hormone treatments, electrolysis to remove facial and body hair, female clothing and personal items, but Kosilek sued again in 2005, arguing that the surgery was a medical necessity and denial of the surgery was making her suicidal. Her lawyers say she has twice tried to kill herself behind bars.
A federal judge in 2012 ordered the Department of Correction to grant the surgery, finding that it was the "only adequate treatment" for her gender-identity disorder. It was the first time a federal judge ordered such surgery.
But the state appealed and that ruling was overturned in December by the 1st U.S. Circuit Court of Appeals in a 3-2 decision, so Kosilek's lawyers turned to the Supreme Court.
Levi said even though Kosilek has exhausted all appeals, the fight for other inmates will continue.
"But it is just a matter of time before some prison somewhere is required to provide essential surgery, meeting the minimal constitutional obligations of adequate medical care for transgender people in prison," she said.
Massachusetts Gov. Charlie Baker, a Republican who took office in January, said he was pleased with the decision.
"In this particular case I was not in favour of using taxpayer money to pay for this surgery," he said.
Associated Press writers Mark Sherman in Washington and Bob Salsberg in Boston contributed to this report.Suggest a correction