Chairman of the Joint Chiefs of Staff Gen. Mark Milley wanted to resign in June 2020 under President Donald Trump and even drafted a letter to that effect but decided to stay and “fight” him from the “inside,” according to an excerpt from a new book.

Milley told his staff, “F-ck that shit…. . I’ll just fight him,” according to an excerpt from the book “The Divider” by Susan Glasser and Peter Baker, published in the New Yorker on Monday.

Milley allegedly added, “If they want to court-martial me, or put me in prison, have at it. … But I will fight from the inside.”

The excerpt prompted questions on social media over whether Milley was supporting a coup, as the president is commander-in-chief according to the Constitution, and Milley admitted that he intended to undermine the president’s authority even if that meant risking a court-martial.

According to the piece, Milley drafted his letter of resignation after he accompanied Trump on a walk across Lafayette Square the day after the White House came under siege by Black Lives Matters protesters and was nearly breached. Trump wanted to project strength, so along with his top advisers, he strode across the square to St. John’s Episcopal Church, which had been burned in the rioting. Milley came under withering criticism from Democrats and the national security establishment afterward.

Milley’s draft letter, which was allegedly written on June 8 — a week after walking with Trump across Lafayette Square — read:

The events of the last couple weeks have caused me to do deep soul-searching, and I can no longer faithfully support and execute your orders as Chairman of the Joint Chiefs of Staff. It is my belief that you were doing great and irreparable harm to my country. I believe that you have made a concerted effort over time to politicize the United States military. I thought that I could change that. I’ve come to the realization that I cannot, and I need to step aside and let someone else try to do that.

The excerpt said Milley was “not sure” if he should give it to Trump, and reached out to friends, mentors, members of Congress, and members of the Bush and Obama administrations. Milley said that most of those he consulted told him to stay, including former Defense Secretary Robert Gates, who had served under Presidents Bush and Obama. Another expert, Peter Feaver, reportedly also urged him not to resign, saying, “We have no tradition of resignation in protest amongst the military.”

Milley “sought to get the message to Democrats that he would not go along with any further efforts by the President to deploy the machinery of war for domestic political ends,” according to the piece. Towards that end, he called House Speaker Nancy Pelosi (D-CA) and then-Senate Minority Leader Chuck Schumer (D-NY).

“Milley was extremely contrite and communicated to any number of people that he had no intention of playing Trump’s game any longer,” Bob Bauer, the former Obama White House counsel who was advising Joe Biden’s campaign and heard about the calls, told Glasser and Baker. “He was really burned by that experience. He was appalled. He apologized for it, and it was pretty clear he was digging his heels in.”

Milley also wanted to resign again after Trump fired then-Defense Secretary Mark Esper, but Esper allegedly told him, “You can’t. … You’re the only one left.”

According to the excerpt, Milley would convene the heads of the military branches, referred to as the Joint Chiefs, to “bolster their resolve to resist any dangerous political schemes from the White House.”

He also regularly contacted former Obama National Security Adviser Susan Rice, according to the excerpt.

Milley also allegedly referred to Trump as the “enemy” to the Biden administration’s lead Pentagon transition official Christine Wormuth.

According to the excerpt, on January 6th, Milley was in his office meeting with Wormuth, with a large monitor displaying four TV networks: CNN, Fox News, Newsmax, and One America News Network.

“You’ve got to know what the enemy is up to,” Milley allegedly joked to Wormuth.

Follow Breitbart News’s Kristina Wong on Twitter or on Facebook.