Trump wants his next chief of staff to agree to hold the job through the 2020 election.
Ayers, who has young triplets, had long planned to leave the administration at the end of the year.
The official spoke on the condition of anonymity to discuss sensitive personnel matters.
Trump spoke to reporters at the White House before departing for the Army-Navy football game in Philadelphia.
He called Kelly "a great guy".
The West Wing shake-up comes as Trump is anticipating the challenge of governing and oversight when Democrats take control of the House in January, and as gears up for his own campaign for re-election in 2020.
Only a day before, Trump named his picks for attorney general and ambassador to the United Nations, and two senior aides shifted from the White House to Trump's campaign.
Kelly had been credited with imposing order on a chaotic West Wing after his arrival in June 2017 from his post as homeland security secretary.
But his iron first also alienated some longtime Trump allies, and he grew increasingly isolated, with an increasingly diminished role.
Known through the West Wing as "the chief" or "the general," the retired Marine Corps four-star general was tapped by Trump via tweet to try to normalise a White House riven by infighting and competing power bases.
"John Kelly will leaving — I don't know if I can say retiring — but he's a great guy," Trump told reporters.
"John Kelly will be leaving at the end of the year.
"We'll be announcing who will be taking John's place — it might be on an interim basis.
"I'll be announcing that over the next day or two, but John will be leaving at the end of the year. ... I appreciate his service very much."
Kelly had early successes, including ending an open-door Oval Office policy that that had been compared to New York's Grand Central Station and instituting a more rigorous policy process to try to prevent staffers from going directly to Trump.
But those efforts also miffed the president and some of his most influential outside allies, who had grown accustomed to unimpeded access.
Kelly's handling of domestic violence accusations against the former White House staff secretary also caused consternation, especially among lower-level White House staffers, who believed Kelly had lied to them about when he found out about the allegations.
In any administration, the role of White House chief of staff is split between the responsibilities of supervising the White House and managing the man sitting in the Oval Office.
Striking that balance in the turbulent times of Trump has bedeviled both Kelly and his predecessor, Reince Priebus.
Trump on Friday announced that he would nominate William Barr, who served as attorney general under President George H.W. Bush, to the same role in his administration.
He fills the slot vacated by former Alabama Sen. Jeff Sessions, who was jettisoned by Trump over lingering resentments for stepping aside from overseeing special counsel Robert Mueller's investigation.
Trump also said that State Department spokeswoman Heather Nauert was his pick to replace Nikki Haley as the next U.S. ambassador to the United Nations.
Earlier Saturday, he announced that he wanted Army chief of staff Gen. Mark Milley as the next chairman of Joint Chiefs of Staff.
Among the other changes, two veterans of Trump's 2016 campaign, White House political director Bill Stepien and Justin Clark, the director of the office of public liaison, are leaving the administration to work on Trump's re-election effort.
The moves had long been planned, but will give Kelly's eventual successor room to build their own political team.
Trump had discussed replacing Kelly on multiple occasions, including following the negative publicity surrounding Kelly's handling of domestic violence accusations against then-White House staff secretary Rob Porter.
Some lower-level White House staffers believed Kelly had lied to them about when he knew of the allegations and when he made clear to Porter that he'd have to leave.
Trump had often tossed around potential replacements, but sensitive to charges that his administration has been marked by record turnover, he said in July that he would keep Kelly in the job through 2020.
But inside the White House, it was viewed largely as an attempt to clamp down on speculation about Kelly's fate during the midterm elections, rather than a true vote of confidence.
Kelly, too, made no secret of the trials of his job, and often joked about how working for Trump was harder than anything he'd done before, including on the battlefield.
In private, Kelly, whom friends said took the job out of a sense of duty to his country, cast himself as safeguarding the public from an impulsive and mercurial president.
Reports of those conversations infuriated the president, who is especially sensitive of attacks on his competence and perceptions he is being managed.
At an event celebrating the 15th anniversary of the Department of Homeland Security, Kelly joked that he missed everyone in the department "every day," offering a deadpan eye roll and smile that drew laughs and applause.
"At six months, the last thing I wanted to do was walk away from one of the great honours of my life, being the secretary of Homeland Security, but I did something wrong and God punished me, I guess," he joked.
Kelly, who had threatened to quit on several occasions, told friends he would be happy if he lasted until his one-year anniversary: July 28.