Isla Bryson, previously known as Adam Graham, was convicted of raping two women and is awaiting sentencing at Cornton Vale women’s prison in Stirling.
The First Minister is now coming under pressure from Scottish Tories and women’s activists to address the decision to house Bryson in a female facility.
A Twitter user shared a photo of Ms Sturgeon holding the hands of a young girl with the caption: “Tonight’s question… what’s your best guess as to what Sturgeon is asking this little girl?”
Harry Potter author Ms Rowling replied to the tweet, saying: “‘Do you agree that a convicted double rapist who decided he was a woman after appearing in court belongs in a women’s prison, or are you a nasty, far right bigot?’”
Ms Rowling had once photographed herself wearing a T-shirt calling the First Minister a “destroyer of women’s rights”.
Ms Sturgeon had attempted to introduce a law which would have allowed Scots to change their legal sex by signing a declaration, but it was blocked by the UK Government.
During the passing of the Bill, a number of MSPs attempted to introduce added safeguards, including those accused of rape charges to be prevented from changing their legal sex while awaiting trial – but some supporters dismissed these changes as “transphobic dog whistles”.
Women’s rights campaigner Joanna Cherry, an SNP MP, said she was concerned about the safety of prisoners in the jail.
She said: “To many people, it will look like this convicted rapist has gamed the system in order to try and garner sympathy, and to end up in a women’s prison. And I think a lot of people will be shocked by that.
“So, I think we should be talking about these cases. Women in prison are very vulnerable.”
Bryson was found guilty of raping one woman in Clydebank in 2016 and another in Glasgow in 2019 following a trial at the High Court in Glasgow. Bryson first appeared in court as Adam Graham in 2019 but was later named in court papers as Isla Annie Bryson.
The Scottish Prison Service said it decides where to send transgender prisoners “on an individualised basis, informed by a multi-disciplinary assessment of both risk and need”.
Downing Street said it understands concerns about the case. Rishi Sunak’s spokesman said: “This is a case in which the courts are yet to hand down a sentence so I’m not going to give anything on the specifics.”