Ms. May’s office said a replacement for Mr. Davis would be announced on Monday.

Britain’s most senior official in charge of negotiating the country’s exit from the European Union resigned on Sunday, accusing Prime Minister Theresa May of undermining Brexit with her plan to keep close trade ties with the bloc.

Brexit Secretary David Davis quit just two days after Ms. May announced she had finally united her quarrelsome government behind a plan for a divorce deal with the EU.

In a blow to the beleaguered Prime Minister, Mr. Davis told Ms. May in a letter that the government’s proposals for close trade and customs ties “will leave us in at best a weak negotiating position, and possibly an inescapable one.”

Mr. Davis’s late-night resignation undermined Ms. May’s already fragile government, which has lost several Ministers in the past year over sexual misconduct allegations and other scandals. Mr. Davis was a strong pro-Brexit voice in a Cabinet divided between supporters of a clean break with the bloc and those who want to keep close ties with Britain’s biggest trading partner.

Ms. May’s office said a replacement for Mr. Davis would be announced on Monday.

The staunchly pro-Brexit Conservative lawmaker Andrea Jenkyns tweeted, “Fantastic news. Well done David Davis for having the principal and guts to resign.”

Ms. Jenkyns said Steve Baker, a junior Minister in the Brexit department, had also quit. There was no immediate comment from Mr. Baker.

Less than nine months remain until Britain leaves the bloc on March 29, 2019, and the EU has warned Britain repeatedly that time is running out to seal a divorce deal.

On Friday, Mr. Davis and the rest of Ms. May’s fractious Cabinet finally agreed on a plan for future trade ties with the EU.

Ms. May is due to brief lawmakers on Monday on the plan hammered out during a 12-hour meeting at Chequers, the prime minister’s country retreat. It seeks to keep the U.K. and the EU in a free-trade zone for goods, and commits Britain to maintaining the same rules as the bloc for goods and agricultural products.

Some Brexit-supporting lawmakers are angry at the proposals, saying they will keep Britain tethered to the bloc and unable to change its rules to strike new trade deals around the world.

In his resignation letter, Mr. Davis said the “‘common rule book’ policy hands control of large swathes of our economy to the EU and is certainly not returning control of our laws in any real sense.”

“It seems to me that the national interest requires a Secretary of State in my department that is an enthusiastic believer in your approach, and not merely a reluctant conscript,” he wrote.

In a letter to Mr. Davis, Ms. May disagreed with his characterization of her plans, saying the deal she seeks “will undoubtedly mean the returning of powers from Brussels to the United Kingdom.”

Conservative lawmaker Jacob Rees-Mogg, a leader of the party’s “hard Brexit” faction, compared May’s plan to an egg so softly boiled that it “isn’t boiled at all.”

“A very soft Brexit means that we haven’t left, we are simply a rule-taker,” he said.

Some Brexiteers dream of replacing Ms. May with a staunch Brexiteer, such as Foreign Secretary Boris Johnson, who in the past has disagreed publicly with his boss.

Mr. Johnson has not commented publicly since Friday. But some senior pro-Brexit Ministers have backed Ms. May’s plan. Environment Secretary Michael Gove said on Sunday that it did not contain everything he wanted but “I’m a realist.”

“All those of us who believe that we want to execute a proper Brexit, and one that is the best deal for Britain, have an opportunity now to get behind the Prime Minister in order to negotiate that deal,” he told the BBC.