Kelly, a former Trump secretary of homeland security, had committed in July 2018 to stay on as chief of staff through at least 2020.
"She's very talented, very smart, very quick, and I think she's going to be respected by all", Trump said.
On Friday, a number of news outlets reported that Kelly's exit was imminent. Just weeks after Kelly arrived, Trump told reporters that both sides were responsible for the violence in Charlottesville, triggered by marches led by white supremacist groups.
The announcement comes just days after Trump announced new appointees for the position of attorney general and ambassador to the United Nations. I'll be announcing that over the next day or two, but John will be leaving at the end of the year. But Ayers offered to postpone it and become chief of staff temporarily. It's not clear if the downturn in his relationship with the president was a direct result of his participation in the investigation - though rumors of tensions between the two have persisted for almost a year. The White House did not respond to request for comment about the discussions.
President Trump on Saturday confirmed that Kelly will leave his position at the end of the year, which will bring an end to the retired four-star Marine Corps general's 17 month-long tenure in the Trump administration.
Trump and Kelly had discussed the chief of staff's departure over the last 24 hours, a source familiar with the matter told CNN.
Mr Trump and Mr Ayers are working out specifics terms under which Mr Ayers would fill the role and the time commitment he will make, the official said.
Since his appointment as special counsel, Mueller has met with the president's son-in-law, Jared Kushner; former legal counsel Don McGahn; former communications director Hope Hicks; senior aide Stephen Miller; former press secretary Sean Spicer; and Kelly's predecessor, former chief of staff Reince Priebus, according to multiple sources with direct knowledge. These include keeping something of a check on access to the Oval Office and keeping control of the messaging from day to day.
Kelly also admitted alerting lawmakers and staffers with hard-right views on immigration before one meeting between Trump and more moderate lawmakers. And Trump often vacillated between criticizing and praising Kelly, sometimes within minutes of each other.
Kelly, 68, had some success in restoring order to Trump's White House after he was appointed in July 2017, but the president bristled at his style.