The internet might have given unprecedented freedom to writers, but with it comes inevitable exposure to trolls. Now one US author has decided to tackle online baiting head-on, in a move that could see payouts of tens of thousands of dollars to four civil rights, women's issues and LGBT charities.

John Scalzi is the author of several books, including the Old Man's War series and Redshirts, published in the States by Tor and the UK by Gollancz. He's also the president of the Science Fiction and Fantasy Writers of America. Fed up of being constantly targeted on his website by one particular individual and his followers, Scalzi decided to take action, pledging US$5 every time "the Racist Sexist Homophobic Dipshit in question posts an entry on his site in which he uses my name (or one of his adorable nicknames for me)".

Scalzi put a ceiling on his "troll tip jar" of US$1,000, figuring that gave his bête noir 200 opportunities to abuse him over the coming year, and said he'd give the cash to four charities: RAINN, America's largest anti-sexual violence organization; Emily's List, dedicated to electing pro-choice Democratic women to office; the Human Rights Campaign, which works for Lesbian, Gay, Bisexual and Transgender Equal Rights; and NAACP: America's oldest and largest civil rights organization.

A novel enough way to tackle the trolls, for sure, but what happened next was somewhat astonishing: Scalzi's friends, Twitter followers and readers asked if they could jump in with pledges too. Many of his friends are high-profile authors and industry types – Will Wheaton, the actor who played Wesley Crusher in TV's Star Trek: The Next Generation, and a writer in his own right, was one of many who promised to match Scalzi's US$1,000 pledge.

By the early hours of this morning, UK time, the pledges for Scalzi's chosen charities had grown to US$50,000.

One of the triggers for the trolling of Scalzi seems to be a satirical blogpost he wrote in October last year attacking conservative politicians for their line on abortion control. It took the form of an open letter to them, in which he adopted the persona of a rapist.

Scalzi says: "Since then he has referred to me as 'McRapey' and other such similar names. I don't know whether he actively encourages people to troll my site, as I don't visit his site (life's too short), but about once a day (recently) someone shows up to troll my comment section, calling me 'McRapey' and or describing me as a 'gamma male' and describing how awesome he is in some way or another. I generally delete the comments when I see them."

Scalzi says there had been previous interactions between him and the man, and describes himself as a "target of opportunity": "I don't think he has any particular beef with me as me. It's mostly about me as someone of some stature in a field he would be like to be seen as having stature in [science fiction and fantasy writing and publishing], and also someone well known enough that when he pokes at me for the amusement of his followers."

But the "McRapey" comments became too much, prompting Scalzi to try to make capital for charities he feels strongly about from the relentless trolling. Was he surprised that his plan resulted in so much support?

"I'm not surprised that people wanted to sign on for this, no," he says. "Many of the people I know are either pros in or fans of the science fiction and fantasy genre, and I suspect it pains them that these views might be seen in any way as representative of where the field is today or where it's heading in the future. This is an easy (and fun!) way to stand against that worldview – and in the process do good for others."

Even if Scalzi's online enemies decide to shut up about him, the author has asked those who pledge money to donate 5% of their maximum offer, so the charities will benefit anyway.

He adds: "The science fiction and fantasy world has as one of its cornerstones the idea of 'pay it forward' – the idea that you help people, not for what you get out of it, but to help others so they may help those who come up after them. This is paying it forward in action, and I'm proud I get to be part of it."