The Dissolution and Calling of Parliament Bill was voted through its final stage of the Commons by 312 to 55.
It repeals the Fixed Term Act that was introduced by the coalition Government in 2011, returning the power to call an election the Prime Minister.
Clipping the wings of the Supreme Court, the Bill also seeks to rule out judiciaral intervention.
The Bill makes it explicitly clear the decision to call an election could not be challenged in the courts.
Cabinet Office minister Chloe Smith told the Commons the legislation “is necessary and proportionate for the avoidance of doubt and to preserve the longstanding position that the prerogative powers to dissolve one parliament and to call another are non-justiciable.”
She added: “Any judgment on their exercise should be left to the electorate in the polling booth.”
Mr Johnson pledged to scrap the Fixed Term Parliaments Act in the 2019 general election.
The decision to write into law there is no legal basis for the courts to intervene in the timing of an election is seen among Westminster as a deliberate attempt by the Prime Minister to get revenge on the Supreme Court.
In September 2019 Mr Johnson planned to prorogue parliament for a number of weeks in a bid to prevent MPs forcing him to extend the date the UK would leave the EU beyond October 31.
However, a legal challenge by a group of Remainers led to the Supreme Court ruling the prorogation illegal.
MPs were sent straight back to Parliament, where they held a vote to force Mr Johnson to beg the EU for another Brexit extension.
More to follow…