Tom Price, the health and human services secretary, resigned on Friday. Mr. Price drew criticism for his use of expensive chartered flights, which undermined President Trump’s promise to “drain the swamp” of an entitled capital.CreditCreditGabriella Demczuk for The New York Times

WASHINGTON — Tom Price, the health and human services secretary, resigned under pressure on Friday after racking up at least $400,000 in travel bills for chartered flights and undermining President Trump’s promise to drain the swamp of a corrupt and entitled capital.

Already in trouble with Mr. Trump for months of unsuccessful efforts to repeal and replace President Barack Obama’s health care program, Mr. Price failed to defuse the president’s anger by offering regret and a partial reimbursement. His departure was the latest from an administration buffeted by turbulence at the top, and capped a week of setbacks for the president.

“I’m not happy, O.K.?” Mr. Trump told reporters who asked about Mr. Price as the president prepared to leave for his New Jersey golf club for the weekend, barely an hour before the resignation was announced. “I can tell you, I’m not happy.” He called Mr. Price “a very good man” but added that the secretary’s offer to pay back the government for just part of the cost of the private flights “would be unacceptable.”

Mr. Price ran afoul of one of the president’s most consequential campaign pledges. While some of Mr. Trump’s advisers privately make light of his vow to drain the swamp of Washington privilege, to many of his voters, it was a threshold promise. The firestorm over Mr. Price came as the president was already on the defensive with his base, as the incumbent mainstream Republican senator he backed in an Alabama primary race lost to an insurgent channeling Mr. Trump’s election movement.

“It’s hard to see how a cabinet secretary can drain the swamp from 42,000 feet in the plush interior of a taxpayer-funded Gulfstream 4,” said Laura Ingraham, a conservative talk show host and Trump supporter who, like others, defied the president by backing Roy Moore, the insurgent Senate candidate who won in Alabama.

Mr. Trump berated Mr. Price in the Oval Office on Friday afternoon for about two hours before heading out to meet with reporters, according to people informed about the meeting. All cabinet travel requests now must be cleared by the White House, they said.

In his resignation letter to Mr. Trump, Mr. Price said: “I have spent 40 years both as a doctor and public servant putting people first. I regret that the recent events have created a distraction from these important objectives. Success on these issues is more important than any one person. In order for you to move forward without further disruption, I am officially tendering my resignation.”

Mr. Trump tapped Don J. Wright, a deputy assistant secretary for health and the director of the Office of Disease Prevention and Health Promotion, to serve as acting secretary. Possible candidates for a successor include Seema Verma, the administrator of the Centers for Medicare and Medicaid Services, and Scott Gottlieb, the commissioner of the Food and Drug Administration.

Mr. Price’s job was on the line since the first of a string of reports by Politico, on Sept. 19, about his extensive use of chartered aircraft. The president has fumed privately and publicly about Mr. Price’s actions. Hoping to assuage Mr. Trump, the secretary offered on Thursday to reimburse the government $51,887 — which he said represented the cost of his seat on the trips — of the at least $400,000 spent. But it was not enough to save his job.

Mr. Price, a physician and a former Republican congressman from Georgia who had long opposed Mr. Obama’s Affordable Care Act, served as a point man on Mr. Trump’s drive to scrap the law. In July, Mr. Trump said he would fire Mr. Price if he did not get the votes for the legislation.

He said it in a jocular fashion, and his audience took it as a jest, but in fact the president has been privately simmering about Mr. Price over the unsuccessful efforts to pass health care legislation in the Senate. While a bill passed the House, the latest effort collapsed this week when enough Senate Republicans defected to deprive Mr. Trump of a majority.

Mr. Price had been under fire from the start. During his confirmation hearing in January, Senate Democrats pressed him on the more than $100,000 in pharmaceutical and medical stocks he owned. Democrats said that Mr. Price had understated the value of his 400,613 shares in an Australian company, Innate Immunotherapeutics. He defended himself, saying, “Everything that I did was ethical, above board, legal and transparent.”

In just eight months since taking office, Mr. Trump has fired or lost a chief of staff, a chief strategist, a national security adviser, a press secretary, two communications directors, a deputy chief of staff, a deputy national security adviser, the F.B.I. director and numerous other aides and advisers.

Mr. Price may not be the only senior official to face anger over travel bills. In recent days, a slew of reports about the fast-lane habits of the cabinet have resulted in a mounting public relations headache for the Trump administration, which is stocked by billionaires accustomed to using private jets.

Ryan Zinke, the interior secretary, used a chartered airplane for several flights, including a $12,000 trip to deliver a speech celebrating a new professional hockey team in Las Vegas. Scott Pruitt, the administrator of the Environmental Protection Agency, has spent more than $58,000 on chartered and military flights, and David Shulkin, the veterans affairs secretary, took his wife on a 10-day trip to Europe that mixed business meetings and sightseeing, according to The Washington Post.

Treasury Secretary Steven Mnuchin asked about using a $25,000-an-hour military plane for his European honeymoon and later used a government jet to fly to Fort Knox in Kentucky in August, a trip that offered him a clear view of a solar eclipse, although he later disclaimed any interest.

Other cabinet members issued statements explaining their travel practices. The Small Business Administration said its chief, Linda McMahon, had used private air services and that “on the rare occasion” she had, she “covered the entire cost out of her own pocket.” Betsy DeVos, the education secretary, travels on personally owned aircraft “at zero cost to U.S. taxpayers” because she “neither seeks, nor accepts, any reimbursement,” the department said.

The sensitivity about the situation within the cabinet was clear on Friday when Mr. Zinke delivered an energy policy address to the Heritage Foundation. He opened his speech by lashing out at what he called “a little B.S.” on chartered flights.

“I fly coach,” he said, adding that he uses chartered or military flights only when necessary. “Every time I travel, I submit the travel plans to the ethics department,” he added. “I will always be honest and up front about my travel.”

Current and former West Wing officials said oversight of Mr. Trump’s cabinet was so lax in the past that Stephen K. Bannon, then the president’s chief strategist, requested meetings once every 60 days to review each member’s agenda and travel itinerary. The secretaries did not flag the questionable flights, the officials said.

John F. Kelly, the White House chief of staff who has tried to impose a military discipline on a chaotic West Wing with mixed success, has ordered the president’s budget director, Mick Mulvaney, to revamp the review process for flights and set limits on prices that cabinet members can pay for transportation, according to two people briefed on the plans.

At a recent meeting with legislative affairs aides for cabinet agencies, Marc Short, the White House legislative affairs director, warned that they should be prepared for additional reports on cabinet secretaries’ expenses, according to a person who attended. Mr. Short said that agencies should assume everything will be made public eventually — and urged the aides to come clean with the president’s staff first.

Additionally, Rick Dearborn, a deputy White House chief of staff tasked with overseeing the cabinet, has been in the president’s cross hairs, according to an aide familiar with the situation. Mr. Dearborn accompanied Mr. Trump on his visit to Alabama last week to support Senator Luther Strange, who lost to Mr. Moore in the state’s Republican primary. On the flight back to Washington, the president lashed out at Mr. Dearborn and White House political director Bill Stepien because he was left supporting a candidate who seemed likely to lose, said the aide who was not authorized to be named.

Two people on the plane insisted the president never chastised his aides. Another adviser said Mr. Dearborn and Mr. Stepien had both cautioned against the trip, but caught Mr. Trump’s wrath once it went badly.

Critics were unmollified by Mr. Price’s departure. “While his resignation ends his time in the government, it does not end the private jet scandal that others in the Trump administration, including Mnuchin, Pruitt and Zinke, find themselves in,” Noah Bookbinder, the executive director of Citizens for Responsibility and Ethics in Washington, a progressive watchdog group, said in a statement.

“This administration,” he added, “seems to believe that the government and the taxpayers serve them rather than the other way around.”

Representative Joseph Crowley of New York, the chairman of the House Democratic Caucus, said the episode demonstrated a lack of judgment in the administration.

“President Trump talked a big game about draining the swamp, yet he continues to surround himself with staff and administration officials who behave as though a separate set of rules apply to them,” he said. “That must end.”

Correction:Sept. 29, 2017

An earlier version of this article referred incorrectly to the events leading up to Secretary Price’s resignation. It was President Trump, not former President Barack Obama, who threatened to fire Mr. Price.