WASHINGTON — John F. Kelly, the retired Marine general tapped as chief of staff by President Trump last year to bring order to his chaotic White House, will leave the job by the end of the year, the latest departure from the president’s inner circle after a bruising midterm election for his party.
Mr. Trump, who made the announcement to reporters on the White House lawn before departing for the Army-Navy football game in Philadelphia on Saturday, said that he would name a replacement for Mr. Kelly, perhaps on an interim basis, in the next day or two.
“John Kelly will be leaving — I don’t know if I can say ‘retiring,’” the president said. “But he’s a great guy. John Kelly will be leaving at the end of the year.”
The leading candidate to replace Mr. Kelly is Nick Ayers, Vice President Mike Pence’s chief of staff and a Republican political operative, who possesses the kind of savvy about campaigns that Mr. Trump has craved. Mr. Kelly, a career military officer before becoming Mr. Trump’s first homeland security secretary, lacked such experience.
Mr. Ayers, 36, has told Mr. Trump that he would serve on an interim basis through the spring, when his family will return to Georgia, according to people familiar with the discussions. But Mr. Trump, who frets about the image of a White House in constant chaos, wants a full-time replacement and is eager for Mr. Ayers to stay for the duration.
If the president ultimately turns to another candidate, potential choices include the Treasury secretary, Steven Mnuchin; his budget director, Mick Mulvaney; and the United States trade representative, Robert Lighthizer.
Mr. Kelly’s coming departure leaves Mr. Trump with an ever-shrinking team of close advisers as he faces increasing peril from federal investigations into his conduct in the 2016 election. On Friday, prosecutors in New York said Mr. Trump had directed illegal payments during that campaign, and prosecutors for the special counsel said his campaign had had contact with Russians as early as November 2015.
Mr. Trump must also begin to navigate a new power structure on Capitol Hill that will be ushered in next month when Democrats assume control of the House. The midterm election, in which Democrats gained 40 seats in the House, laid bare the challenges Mr. Trump faces in his 2020 re-election campaign.
The chief of staff’s exit adds another prominent name to the list of core advisers who have left after trying to manage the president through his nearly two years in office, often finding themselves shunned and sidelined for their efforts.
Mr. Kelly did not show up to work on Friday. But Mr. Trump and Mr. Kelly met in the White House residence on Friday night and hashed out the details of a departure that had been anticipated for months, according to people familiar with the meeting. Mr. Pence and Mr. Ayers also attended the meeting.
Mr. Kelly had planned to announce his departure to senior staff members on Monday, but Mr. Trump pre-empted him on the South Lawn on Saturday afternoon.
Mr. Ayers has had a rapid ascent in the Republican Party since he dropped out of Kennesaw State University to help lead Sonny Perdue’s successful 2002 bid for Georgia governor.
He has also accumulated significant wealth, reporting a net worth last year of $12.2 million to $54.8 million, partly through a complicated web of political and consulting companies in which he has held ownership stakes. Along the way, he has drawn a number of detractors who have found him focused more on promoting himself than on tackling the job at hand.
Although the president had previously made a display of saying that Mr. Kelly, 68, would stay through the 2020 re-election effort, the chief of staff had been blunt with several people in the White House that he planned to make it only through the midterms.
Mr. Kelly’s resignation had long been rumored amid signs that he and Mr. Trump had grown irritated with each other. The president — as freewheeling as Mr. Kelly is methodical — privately fumed that he believed his chief was hiding things from him, and frequently upbraided him in the West Wing on matters large and small.
The chief of staff, who often said privately that he did not believe that Mr. Trump appreciated or understood his own job, had taken to telling colleagues “I don’t need this” after such criticism from the president.
Yet for months, the dysfunctional dynamic continued without a firing or a resignation.
Presidents typically make changes in staffing after midterm elections. During a wide-ranging news conference the day after the vote, the president deflected questions about the job security of Mr. Kelly and Jeff Sessions, the attorney general at the time. Mr. Sessions was forced out later in the day in a Twitter post.
“People leave,” Mr. Trump said at the time. “It’s a very exhausting job — although I love doing it, I must tell you — but it’s exhausting for a lot of people. I’m surprised that a lot of people, they start off, they’re young people. They’re there for two years, and they’re old by the time they leave.”
In early October, Nikki R. Haley, the American ambassador to the United Nations, said she was resigning. Mr. Trump on Friday named Heather Nauert, the State Department spokeswoman, as her replacement. He also said he would nominate William Barr, an attorney general during the first Bush administration, to that post in his administration.