The Prime Minister was seen being ushered into a silver Jaguar car as gunfire rang out at Parliament during the incident.
A Downing Street source declined to say where Mrs May had been during the attack, but said she had not been involved.
Other MPs and staff sent messages to friends and family to let them know they were safe.
Labour MP Jon Trickett thanked the police and tweeted: "Democracy will not be intimidated by terror."
Former Chancellor George Osborne wrote: "All our thoughts with injured police officer & those keeping our Parliament and our democracy safe right now."
Commons Leader David Lidington broke the news of the sickening attack to MPs.
Theresa May is driven away after the Westminster terror attack
He said: "What I am able to say to the House is there has been a serious incident within the estate.
"It seems that a police officer has been stabbed, that the alleged assailant was shot by armed police.
"An air ambulance is currently attending the scene to remove the casualties.
"There are also reports of further violent incidents in the vicinity of the Palace of Westminster but I hope colleagues on all sides will appreciate that it'd be wrong of me to go into further details until we have confirmation from the police and from the House security authorities about what is going on."
THIS IS A BREAKING STORY… MORE TO FOLLOW
Get Quotes on Home Insurance