The prime minister has faced a backlash from her MPs against her latest Brexit plan, which included concessions aimed at attracting cross-party support.
Andrea Leadsom quit as Commons leader on Wednesday saying she no longer believed it would “deliver on the referendum result”.
Mrs May met Home Secretary Sajid Javid and Foreign Secretary Jeremy Hunt at Downing Street on Thursday where they are understood to have expressed their concerns about the bill.
In her statement on Friday, she said that in order to deliver Brexit, her successor would have to build agreement in Parliament.
“Such a consensus can only be reached if those on all sides of the debate are willing to compromise,” she said.
Mrs May said she had done “everything I can” to convince MPs to support the withdrawal deal she had negotiated with the European Union but it was now in the “best interests of the country for a new prime minister to lead that effort”.
Mrs May’s voice shook as she ended her speech saying: “I will shortly leave the job that it has been the honour of my life to hold.
“The second female prime minister, but certainly not the last.
“I do so with no ill will, but with enormous and enduring gratitude to have had the opportunity to serve the country I love.”
On Theresa May resigns, Labour Leader Jeremy Corbyn said she had been “right to resign” and that the Conservative Party was now “disintegrating”.