John Bercow, the speaker of the House of Commons, said he will stand down on 31 October 2019 or at next general election, whichever comes first.
Bercow said he would not contest the next election if parliament voted later on Monday in favour of holding one.
If, as expected, MPs reject the government's attempt to call an election, he said he would quit on October 31.
"At the 2017 election, I promised my wife and children that it would be my last," Bercow told MPs. "This is a pledge that I intend to keep."
He said that 31 October was the "least disruptive" time to stand down as the week prior "may be quite lively and it would be best to have an experienced figure in the chair."
Bercow was referring to the week after the Queen's speech on October 14 which will be followed by an EU summit on 17-18 October and then the final days before the Brexit deadline on October 31.
He thanked his wife, Sally, and three children, Oliver, Freddie, Jemima. He said serving as speaker was "the greatest privilege and honour of my professional life for which I will be eternally grateful."
The speaker also paid tribute to parliament, "a wonderful place filled overwhelmingly by people who are motivated by their notion of the national interest, by their perception of the public good, and by their duty, not as delegates, but as representatives to do what they believe is right for our country."
"We degrade this parliament at our peril. I have served as a member of parliament for 22 years and for the last 10 as speaker.
"I wish my successor in the chair the very best fortune in standing up for the rights of honourable and right honourable members individually, and for parliament institutionally as the Speaker of the House of Commons. Thank you."
A slew of MPs from both benches rose to pay tribute to Bercow, including Labour leader Jeremy Corbyn, Micheal Gove, Chancellor of the Duchy of Lancaster, and Jo Swinson, leader of the Liberal Democrats.
Hilary Benn, the Labour MP who tabled the now-passed legislation to prevent the government from leaving the Eu without a deal on October 31, described Bercow as "a great reforming Speaker."
"But most important of all, he has enabled MPs to question ministers, and debate and vote on the issues that really matter," he added.
Arch Brexiteer Nigel Farage, meanwhile, reacted on Twitter, writing; "Good riddance."
Guy Verhostadt, the European Parliament Brexit negotiator also paid tribute to Bercow as "a driven speaker and gifted orator" as well as "the keeper of the great British parliamentary tradition."
The US ambassador to Britain, Robert Johnson, wished Bercow, whom he described as a "GREAT champion of the Special Relationship," well, and said "Parliament won't be the same without his distinctive call to "order ORDEEER!"