McGarvey, a political activist, commentator, broadcaster and former columnist with The Scotsman, recalled how he was targeted for abuse by independence supporters when Rowling’s backing for a crowdfunding campaign was revealed.
He also told of efforts behind the scenes in the Scottish cultural sector to try to stop him getting work and recognition.
Speaking during an “in-conversation” Fringe event, McGarvey said Rowling's backing "changed the centre of gravity" in his career as she had been the first major writer in Scotland to offer him support.
McGarvey, a prominent Yes campaigner in the run-up to the last referendum, said he was “not particularly inspired” to fight for independence at the moment.
McGarvey, who was brought up in the Pollock estate in Glasgow, was interviewed by the poet Jim Monaghan at the New Town Theatre.
He revealed he had been encouraged by Glasgow author Denise Mina to write a book after reading an article he had written criticising the response in the cultural sector to the 2014 fire at Glasgow School of Art’s Mackintosh Building.
He recalled how he was close to signing a book deal with Glasgow publisher Freight when contact was suddenly cut off.
McGarvey said: “I thought Freight was going to publish me and then someone gave them really bad advice.
“It was a time when I was creating a lot of friction as a working-class artist.
“Behind the scenes of various places they were trying to stop me from getting opportunities, whether it was in The List magazine’s hottest artists of the year listings, The Skinny magazine, bookings, publishing or whatever.
“With Freight the phone just stopped ringing, it went dead. Luckily Gavin [MacDougall] at Luath got the idea [for Poverty Safari] and we just greenlit it.
“I’d already built up quite a following. He could see what I was bringing to the table.
“I refused to go down the public funding route at that time and took the more risky strategy of doing a crowdfunder, which was pretty successful and led to me writing the book. I had no idea how successful it was going to become.”
Rowling donated £5,000 to McGarvey’s book and also provided a quote for its cover, describing it as “an unflinching account of the realities of systemic poverty”.
Asked by Monaghan about the criticism he had received from independence supporters over Rowling’s endorsement, McGarvey said: “They were [angry], particularly Yes supporters who had never supported anything I had done and wouldn’t like me regardless of anything I had done.
“I decided I was not going to try to live my life pleasing these people who f***ing hate me when I have people who had shown me a certain level of kindness and generosity.
“She showed me a level of generosity and encouragement that I had not had from anyone prominent in the industry in that way. It changed the centre of gravity for me career-wise. I’ll always be grateful.
“It [the cover quote] gave it a level of prominence that people thought ‘this is something I’ll have to check out’. But people thought it was me being bought off.”