Mike Freer said it happened at North Finchley mosque in north London as he met constituents on Friday afternoon.
Mr Freer said about 12 people forced their way inside, with one of them calling him a "Jewish homosexual pig".
The trouble began after messages on the Muslims Against Crusades website urged supporters to target him, he said.
Mr Freer said a message posted ahead of the incident on the group's website made reference to Labour MP Stephen Timms, who was stabbed while holding a surgery in east London last year.
It warned the attack on Mr Timms should serve as a "piercing reminder" to politicians that "their presence is no longer welcome in any Muslim area".
The Finchley and Golders Green MP, a member of the Conservative Friends of Israel, said there was a vocal demonstration outside the mosque as he began his surgery, but then a second group of people arrived and forced their way inside.
"One of them sat at a table where I was dealing with a constituent and was abusive," he said.
The MP said he was then escorted by staff at the mosque to a locked part of the building until assistance arrived.
Mr Freer said he only realised the potential danger he had been in when he was made aware of the website's reference to the attack on East Ham MP Mr Timms.
The message also stated that "as a member of the Conservative Party", Mr Freer had "the blood of thousands of Muslims on his hands".
"Had I seen the website beforehand, I suspect it might have been a bit more worrying," the MP said.
Mr Freer, who played a prominent role in the campaign against Palestinian activist Sheikh Raed Salah's visit to the UK earlier in the year, said he would "continue to condemn all forms of religious intolerance".
He added that he wanted Home Secretary Theresa May to monitor closely the actions of Muslims Against Crusades.
A Metropolitan Police spokesman said: "Officers attended North Finchley Mosque at 4.10pm on Friday after a disturbance by protesters inside the building.
"There were no arrests."
An MP has described how he waited for police behind a locked door during a constituency surgery after he was threatened by a group of men.