Speaking to the BBC’s Newsnight, Sir Elton said companies “haven’t done anything to try to stem the flow of hate on the internet”.
His interview followed him giving the Diana, Princess of Wales lecture on HIV, in which he called on firms to harness their social power.
He said a boycott could make the firms “sit up” and take action.
Sir Elton said to Newsnight’s Kirsty Wark: “I don’t know why they [social media firms] allow it – it’s supposed to be free speech but the things that are on social media are so disgusting that there has to be action taken by the people who own these companies.”
He added: “‘People say ‘well what about my freedom of speech?’ Well, sod your freedom of speech.”
He then called for a boycott, saying: “Why not? Then they’ll sit up. When the money is not coming in they’ll sit up.
“They can do so much good, but first they have to clean house and become a much more moral and Christian thinkingR30; a moral thinking compass for what’s going on in the world.
“At the moment they’re not doing that.”
Earlier, in his lecture, Sir Elton told an audience of politicians, health workers and celebrities in London: “Companies like Facebook and Instagram cannot pretend they are purely private enterprises. I believe they have a public role and responsibility.
“Imagine if they put their mic behind debates that could counter ignorance. Homophobia fuels shame, isolation, cruelty and anger, and therefore HIV.
“But if we found ways to automatically respond to hatred with fact, good could be all the way around the world before falsehood even got its boots on.”
Sir Elton praised the work of his close friend Diana, Princes of Wales, in championing Aids and HIV treatment.
In a famous moment from the 1980s, when many still thought the disease could be contracted through casual contact, Diana sat on the bed of a man with Aids and held his hand.
The National Aids Trust began the lectures in 1999 as an honour to the late Princess.