Police are investigating a Scottish charity who last week labelled JK Rowling a "bitch" for donating £1 million to Scotland's anti-independence campaign, Better Together.
The author was the target of abuse on social media and police are treating it as "online criminality".
Scotland's senior prosecutor said those responsible for "grossly offensive" messages would be prosecuted.
The tweet posted last Wednesday read: "What a #bitch after we gave her shelter in our city when she was a single mum."
The charity, ironically named The Dignity Project, appeared to have been upset by the Harry Potter creator's decision to donate to the campaign, run by her friend and former chancellor, Alistair Darling.
The organisation later claimed their Twitter feed had been hacked, but the offending message remains online.
Rowling was also branded a"specky b******", a "Union cow bag" and a "disgrace" in social media posts from fervent nationalists.
However, Scottish independence supporters defended the writer and expressed their outrage, branding the abuse misogynistic. Comedy writer Simon Blackwell pointed out that they might want to look up the meaning of dignified. Others suggested Rowling had done a lot for the country and charity.
The writer made a statement on her website about her donation saying: "My hesitance at embracing independence has nothing to do with lack of belief in Scotland's remarkable people or its achievements. The simple truth is that Scotland is subject to the same 21st-century pressures as the rest of the world.
"It must compete in the same global markets, defend itself from the same threats and navigate what still feels like a fragile economic recovery. The more I listen to the yes campaign, the more I worry about its minimisation and even denial of risks."
A message on the charity's website read:
"The Dignity Project has had it's Twitter account hacked. We are not responsible for any tweets that have been sent. As a charity we do not take any political stance and our opinion is people are free to donate to whoever they choose. To the people who hacked our account if helping African children to thrive and survive including single mums is bad thing that is their problem. "