Commons Speaker Sir Lindsay Hoyle was told a bomb would be placed under his car in a disturbing threat sent via an offshore Twitter account.
Sir Lindsay has called on social media firms "get their act together" and deal with anonymous accounts and reams of abuse sent to MPs online.
It comes as the brutal murder of Sir David Amess, who was stabbed while at a constituency surgery at a church in Leigh-on-Sea on Friday, sparks fresh concern over the security of MPs.
The killing follows the death of Jo Cox in 2016.
Speaking to Times Radio, Sir Lindsay said: "We should also know who is putting up on social media. We should know the person behind it.
"These fake accounts, when we don't know who they are. Offshore accounts being used as well, for threats and intimidation.
"When somebody threatened to put a bomb under my car, just recently, that was done from an offshore account."
He added: "Recently, I've had a couple of death threats. Maybe it's because I've got a higher profile of being the Speaker.
"People then they take exception and they think the answer is that there's others to inspire to murder me and the threats being out there.
"These things happen. But what it won't do, it won't stop me carrying out the job I'm elected to, whether that's the MP for Chorley and the Speaker of the House of Commons."
He said if social media companies fail to take action on online hate, then MPs should legislate.
He said: "We have got to take it seriously. The companies have got one chance. If it was up to me and I was in charge of legislation, I would have done something."
"We are working very closely with them, some aren't working as well as they should do and they need to get their act together," he added.
Home Secretary Priti Patel did not rule out scrapping online anonymity in an interview with broadcasters on Sunday.
She said: “I want us to look at everything.
“There is work taking place already. We have an Online Harms Bill that will come to Parliament, there is working taking place on it right now.
“I’ve done a lot of work on social media platforms, mainly around encryption and areas of that nature.
“But we can’t carry on like this. I spend too much time with communities who have been under attack, basically who have had all sorts of postings online and it is a struggle to get those posts taken down.
“We want to make some big changes on that.”
Since Sir David’s death, MPs have been sharing their day-to-day experience of the threats they face.
Senior Labour MP Ms Nandy, asked whether she felt safe doing her job in her constituency, replied: “No, not really if I’m honest.”
The representative for Wigan said she backed the idea of MPs being able to ask for police protection at public meetings.
“I’m not sure that we can ever eliminate the risk but there are other things that can be done to reduce the risk,” the shadow foreign secretary told Trevor Phillips during an interview on Sky News.
“I think the suggestion from the Speaker about ensuring that anyone who wants or needs security at surgeries is a good idea, not least because people often know, even if we don’t advertise them, that they are happening, so they can become a magnet for people who want to come and cause trouble.”
Andrew Rosindell, the Tory MP for Romford, said MPs were “a little bit” frightened after Friday’s tragic events and that he would recommend not publicising constituency surgeries online.
Speaking to PA in Leigh-on-Sea, he said: “The problem with social media is that it can be picked up by anybody anywhere. A bad person can see it and can suddenly turn up and this is clearly what happened with David.”
Sir David had publicised his surgery at the church on Twitter several days before the attack.