In her upcoming memoir, Settle for More, Megyn Kelly revealed that she was one of the many women who was sexually harassed by Fox News founder Roger Ailes. But she also may have been instrumental in his undoing, according to excerpts from the yet-to-be-released book that were obtained by the New York Times.

After Gretchen Carlson filed her sexual harassment lawsuit against Ailes, 21st Century Fox vowed to conduct an "internal review" of his behavior. But Kelly wrote that she heard that Ailes was "working to limit the review to just a small circle of staffers—those that had worked directly with Gretchen."

"He wanted the net cast very narrowly to exclude virtually all of the Fox News talent," Kelly wrote. "I knew what that would likely mean." Kelly feared the review would not be rigorous and that Ailes wouldn't be held accountable.

After Ailes left the network in July, some employees spoke out in his defense—Kelly did publicly defend him, and after hearing that the investigation would likely be limited to Carlson's staff, she decided to speak out against him.

"The choice became clear: honor my ethical code, or abide by my loyalty to Roger. There was no way to do both," she wrote.

That same month, she called Lachlan Murdoch and asked him to get a "general counsel" on the line before detailing her own allegations of sexual harassment by Ailes, which she also wrote about in her memoir. Ailes allegedly offered to advance her career "in exchange for sexual favors" and tried "physical advances" after she rejected his advances.

In January 2006, Ailes allegedly tried to grab her "repeatedly" and kiss her. When she shoved him away, "he asked me an ominous question: 'When is your contract up?'" before trying to kiss her again.

Within days of her call to Murdoch, 21st Century Fox announced that they had hired Paul, Weiss, Rifkind, Wharton & Garrison to conduct the investigation, an announcement which became public on July 11th, five days after Carlson filed her suit. Ailes left Fox News on July 21st.

"Despite Roger's attempts to prewire it, the Paul, Weiss review was not a whitewash," Kelly wrote in her memoir. "They were genuinely searching for the truth. When they found it, they knew Roger had to go."