Naa'imur Zakariyah Rahman, 21, planned to bomb the gates of her Downing Street office, kill guards and then attack May.
Judge Charles Haddon-Cave called Rahman, originally from Birmingham in central England, a "very dangerous individual" as he handed down the life sentence with a minimum 30-year term at England's Old Bailey central criminal court in London.
"It is difficult to predict when, if ever, he will become de-radicalised and no longer be a danger to society," he added.
Briton who plotted to kill Prince George jailed for life
Rahman thought he was being helped by an IS group handler when in fact he was speaking to undercover officers.
He had collected what he thought was an explosives-packed rucksack when he was arrested last November.
"Before his arrest prevented it, he was, he believed, just days away from his objective, which was no less than a suicide attack, by blade and explosion, on Downing Street and, if he could, upon the Prime Minister Theresa May herself," said prosecutor Mark Heywood.
In a chat with an undercover security service agent on the Telegram messaging app, Rahman said: "I want to do a suicide bomb on parliament. I want to attempt to kill Theresa May."
Rahman continued: "My objective is to take out my target. Nothing less than the death of the leaders of parliament."
He told an undercover police officer that he would make a "10-second sprint" for the door at Downing Street, with his main objective to "take her head off".
Rahman earlier admitted helping his friend Mohammad Aqib Imran, 22, join IS in Syria by recording a sponsorship video, for which he was handed a six-year jail term, to run concurrently with his life sentence.
COMMENTS (2)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ