Despite being unsatisfied with many of the Republican candidates for president in 2012, Mr. Ailes endeavored to promote Mitt Romney on Fox News programs, the book says. Before the Wisconsin congressman Paul D. Ryan was chosen as Mr. Romney’s running mate, Mr. Ailes advised Mr. Ryan that his television skills needed work and recommended a speech coach.

At the beginning of the general election, a four-minute video criticizing President Obama’s policies was broadcast on “Fox and Friends,” provoking outrage from the left and prompting the network to say publicly that Mr. Ailes had no involvement in its creation. In “The Loudest Voice in the Room,” Mr. Sherman writes that the video “was Ailes’s brainchild.”

The New York Times obtained a copy of the book in advance of its publication.

Mr. Sherman said in the source notes that he interviewed 614 people who knew or worked with Mr. Ailes for the book, which took more than three years to report and write. More than 100 pages are devoted to source notes and bibliography.

Former employees cited in the book talked of Mr. Ailes’s volatile temper and domineering behavior. In one anecdote, a television producer, Randi Harrison, told Mr. Sherman that while negotiating her salary with Mr. Ailes at NBC in the 1980s, he offered her an additional $100 each week “if you agree to have sex with me whenever I want.”

A Fox News spokeswoman said in a statement on Tuesday: “These charges are false. While we have not read the book, the only reality here is that Gabe was not provided any direct access to Roger Ailes and the book was never fact-checked with Fox News.”

The book also describes an explosive episode dating back to 1995, when Mr. Ailes was a high-ranking executive at NBC and locked in a power struggle with another executive, David Zaslav.

At a company dinner, according to the book, Mr. Ailes made clear he was ready to do battle with Mr. Zaslav. “Let’s kill the S.O.B.,” he told his dining companions, Mr. Sherman writes. At a separate meeting with Mr. Zaslav, the book says, Mr. Ailes was said to have unleashed a vulgar, anti-Semitic slur at his rival.