McGahn did not deliver his resignation threat directly to Trump but was serious about his threat to leave, according to a person familiar with the episode.
Trump denied the report Friday when asked about it during the World Economic Forum in Davos, Switzerland.
"Fake news, folks. Fake news," Trump told reporters.
The president's effort to fire the special counsel came in the weeks after Mueller's appointment last May to lead the probe into whether Trump's campaign coordinated with Russian attempts to tilt the election. Mueller was tapped for the role by Deputy Attorney General Rod J. Rosenstein after Trump fired FBI Director James B. Comey.
The special counsel probe has quickly expanded to include an exploration of whether Trump has attempted to obstruct the ongoing investigation — a line of inquiry that could now include the president's threats to fire Mueller himself.
Peter Carr, a spokesman for the special counsel's office, declined to comment. McGahn did not respond to requests for comment.
A White House spokesman referred questions to Ty Cobb, the attorney coordinating the administration's response to the Russia investigations, who did not immediately respond to requests for comment. John Dowd, an attorney for the president, declined to comment.
Democrats late Thursday renewed their calls for Congress to pass legislation to protect Mueller and future special counsels from being fired by the president. At least two such bills have been introduced in recent months by members of both parties.
Sen. Mark R. Warner (Va.), the ranking Democrat on the Senate Intelligence Committee, which is conducting its own investigation of Russian interference, said in a statement that "firing the Special Counsel is a red line that the President cannot cross. Any attempt to remove the Special Counsel, pardon key witnesses, or otherwise interfere in the investigation, would be a gross abuse of power, and all members of Congress, from both parties, have a responsibility to our Constitution and to our country to make that clear immediately."
Sen. Richard Blumenthal (D-Conn.), a former state attorney general, described Trump's attempt to oust Mueller as "remarkable and stunning," adding in an interview, "it shows the need immediately to protect the special counsel."
Republican Rep. Charlie Dent (Pa.) said in an interview that McGahn "prevented an Archibald Cox moment," referring to the special prosecutor ordered fired by President Richard M. Nixon during the Watergate investigation.
"I believe now that this revelation has been made public, that there will be increasing pressure to protect Mueller," Dent added.
Trump was initially calm when Mueller was appointed, surprising White House aides, according to a senior administration official.
But in the weeks that followed, the president spoke with a number of friends and advisers who convinced him that Mueller would dig through his private finances and look beyond questions of collusion with Russians. They warned that the probe could last years and would ruin his first term in office.
At the time, Trump's legal team was urging him to take an aggressive posture toward the special counsel and was compiling arguments about why Mueller could not be impartial. Among the points cited: an allegation that Mueller had gotten into a dispute over membership fees before he resigned from a Trump-owned golf course in Northern Virginia in 2011.
The dispute was hardly a dispute at all. According to a person familiar with the matter, Mueller had sent a letter requesting a dues refund in accordance with normal club practice and never heard back.
Trump's ire at Mueller rose to such a level that then-White House strategist Stephen K. Bannon and then-Chief of Staff Reince Priebus grew "incredibly concerned" that he was going to fire Mueller and sought to enlist others to intervene with the president, according to a Trump adviser who requested anonymity to describe private conversations.
Both of the men were deeply worried about the possibility and discussed how to keep him from making such a move, this person said.
Priebus and Bannon did not immediately respond to requests for comment.
In one meeting with other advisers, Bannon raised the concern that if Trump fired Mueller it could trigger a challenge to his presidency based on the 25th Amendment, which lays out the process of who succeeds a president in case of incapacitation.
Despite internal objections, Trump decided to assert that Mueller had unacceptable conflicts of interest and moved to remove him from his position, according to the people familiar with the discussions.
In response, McGahn said he would not remain at the White House if Trump went through with the move, according to a senior administration official.
The president, in turn, backed off.
Since then, Trump brought in a new legal team that has counseled cooperation with Mueller. He has continued to fume about the investigation, even as his lawyers have publicly pledged to work with the special counsel. On Thursday, Dowd released a memo outlining the administration's commitment to transparency, noting that more than 20 White House officials have voluntarily given interviews.
But the revelation that Trump tried to fire Mueller could be a critical piece of evidence for the special counsel as he tries to build an obstruction case, said white-collar criminal defense attorney Jacob Frenkel, who previously worked in the Office of Independent Counsel.
"In the jigsaw puzzle of circumstantial evidence of criminal intent, these are more pieces that Mueller certainly would use," Frenkel said. "You build it around the timing."
The president's attorneys will probably try to argue that Trump was merely responding to current events, without intending to impede anything, Frenkel added.
"The defense would be this was merely an emotional response that's reflective of the frustration about the ongoing investigation and its distraction from the ability to govern," he said.
Robert Costa, Ed O'Keefe, Philip Rucker, Sean Sullivan and Matt Zapotosky contributed to this report.