Mr Carmichael said the online pests are characterising anyone who disagrees with independence as being anti-Scottish.
The Orkney and Shetland MP criticised recent comments by the First Minister and his deputy. He called on them to avoid the rhetoric that seeks to define degrees of Scottishness according to whether people are for or against independence.
Mr Carmichael was speaking in Inverness yesterday, where he delivered his first keynote speech in the job since he replaced Michael Moore last month.
He said he was a proud Scot from Islay with a Gaelic speaking father. But he had recently been described as a "supposed Scot" by an SNP councillor in Fife.
He said: "Not content with trying to divide the UK, the supporters of independence also seek to divide our fellow Scots - depending on their voting intentions in the referendum. I tell you this, once you start mixing up politics and patriotism you can quickly get into dangerous territory."
He said Mr Salmond had said he wanted to see the Prime Minister David Cameron "argue against Scotland" not against Scottish independence.
In addition, Ms Sturgeon had recently described him as being the Secretary of State "against" Scotland.
After his official speech he told the media: "One view is that is just a wee bit of predictable political knock about. But look at my Twitter feed. See the names I get called.
"That's something that happens because the trolls on Twitter are emboldened when they see the Alex Salmonds and Nicola Sturgeons of this world taking essentially the same approach."
He accepted the SNP leadership had not pursued the "supposed Scot" line of attack, but he didn't think it made any difference
"Listen they don't have to. If somebody else is doing it, it is out there. I think Nicola saying that I am the Secretary of State against Scotland; that if you disagree with her you are against Scotland, is not a million miles away from the 'supposed Scot' angle."
He said that within their respective parties they all had leadership roles. "If any Liberal Democrat councillor had referred to a nationalist in a way that was as inappropriate as that, I would have slapped him or her down immediately. But all you get from high command in the SNP is just a deafening silence.
"Every Scot is entitled to their own definiton of what it is to be a Scot. To say that some Scots are better than other Scots, I think is immensely dangerous territory."
But a spokesman for the SNP said that Nicola Sturgeon had already made clear that no one's Scottishness should be questioned on the basis of their political views."
Ms Sturgeon said her own family background was part-English, with a grandmother from England.
"But like so very many people of mixed heritage who live and work in Scotland, I passionately believe Scotland's future should be in Scotland's own hands.
"As it happens, unlike Alistair Carmichael, I don't drink malt whisky - but I am looking forward to toasting a historic Yes vote next year and the huge opportunities that will bring to people, families and communities all over Scotland," Ms Sturgeon said.