The prime minister informed the 1922 Committee of Conservative lawmakers of her decision Wednesday.
Her office added that a leadership contest to replace May will begin after May 22 — if her deal to leave the European Union is passed.
WATCH: UK’s May tells lawmakers, ‘Unless this house agrees to it, no deal will not happen’
“This has been a testing time for our country and our party. We’re nearly there. We’re almost ready to start a new chapter and build that brighter future,” she said at the meeting.
She said she hopes her departure encourages lawmakers to support the deal.
“I am prepared to leave this job earlier than I intended in order to do what is right for our country and our party,” May said.
“I ask everyone in this room to back the deal so we can complete our historic duty — to deliver on the decision of the British people and leave the European Union with a smooth and orderly exit.”
WATCH: Anti-Brexit march takes over London
Northern Ireland’s Democratic Unionist Party has indicated it would not support the Brexit proposal over the issue of the border between the Republic of Ireland and Northern Ireland.
Britain was due to leave the EU on March 29 but May has got a short delay after her divorce deal with the EU was rejected overwhelmingly by lawmakers on two occasions.
In non-binding indicative votes Wednesday, eight different alternative Brexit options were rejected by parliament. They included leaving the European Union without a deal, staying in the bloc’s customs union and single market, putting any EU divorce deal to a public referendum, and cancelling Brexit if the prospect of a no-deal departure gets close.
It still remains uncertain how, when or even if Britain will leave the EU.
Anti-Brexit sentiments have gained momentum in recent days, with demonstrations across London. A petition to halt the divorce has also been signed by nearly six million people.
— With files from Reuters, The Associated Press