White House counsel Donald McGahn will exit his post in the fall, President Donald Trump said Wednesday.

"White House Counsel Don McGahn will be leaving his position in the fall, shortly after the confirmation (hopefully) of Judge Brett Kavanaugh to the United States Supreme Court," Trump wrote in a message posted on Twitter. "I have worked with Don for a long time and truly appreciate his service!"

McGahn played a key role coordinating the president's rapid appointment of federal judges, and has been a central figure in special counsel Robert Mueller's Russia probe. As Trump mulled who he would nominate to the Supreme Court after the retirement of Justice Anthony Kennedy, McGahn pushed him to select Kavanaugh.

An attorney for McGahn did not immediately respond to a request for comment from CNBC on Wednesday.

Sen. Chuck Grassley, the Iowa Republican who chairs the Senate's Judiciary Committee, said Wednesday that he hoped news of McGahn's exit was not true. The president, he said, "can't let that happen."

The Judiciary Committee is set to hold a hearing next week on Kavanaugh's nomination.

Trump tweet

McGahn has cooperated extensively with the special counsel and is a potential witness in Mueller's investigation, which also is looking into whether the president has obstructed justice. While Trump has yet to sit down with investigators working on the inquiry, The New York Times reported in August that McGahn opted to answer Mueller's questions in at least three interviews spanning 30 hours.

In a series of tweets after the publication of the story, Trump railed against the Times' report for making it seem like McGahn had "TURNED on the President, when in fact it is just the opposite."

Trump reportedly ordered McGahn to direct Justice Department officials to fire Mueller in June 2017. McGahn refused and threatened to resign rather than carry out the order, and Trump backed down on the request, according to a Times report in January.

Grassley tweet

The president and his attorneys have repeatedly denied any wrongdoing and have accused Mueller of leading a "witch hunt."

Earlier Wednesday, political news publication Axios reported that McGahn would depart in the fall and that Trump had not formally decided on who would replace him. McGahn's choice for successor is Emmett Flood, a veteran lawyer who was named to Trump's legal team in May, according to Axios.

Whoever is selected to succeed McGahn could face the legal challenge of dealing with a barrage of subpoenas from Democrats should the party take control of one of the chambers of Congress this fall.

A former senior Trump administration official told CNBC earlier this month that Flood's appointment was "telling" ahead of the November midterms.

"Flood has experience and respect in Washington, and handled very high-profile oversight matters and congressional inquiries," the former official said at the time.

McGahn's exit marks the latest high-level departure from a White House that has had an unusually high turnover rate.