Evangelical voters make up a core constituency for Mr. Trump. Without their support, he would not have won the presidency, his advisers acknowledge. And the president has sought ways to engage those supporters.

For his part, in 2016, Mr. Cruz was candid with friends about his view of evangelicals who backed Mr. Trump. “If you’re a faithful person, if you believe that Jesus Christ died for your sins, emerged from the grave three days later and gives eternal life, and you’re supporting Donald Trump,” the book quotes Mr. Cruz saying to friends, “I think there’s something fundamentally wrong with you.”

Mr. Cruz won the caucuses by a small margin, following questionable tactics that the Cruz campaign used against a third candidate, Ben Carson. When Mr. Cruz won, Mr. Trump, aboard his private plane, called the chairman of the Iowa Republican Party, Jeff Kaufmann, and said, “I think you need to publicly disavow the result.” When Mr. Kaufmann said he could not do that, Mr. Trump was quiet for a moment, and then repeated: “You should disavow the result. Think about it, will you?”

Mr. Cruz was the last candidate standing against Mr. Trump deep into the primary election season. Mr. Trump clinched the nomination after the Indiana primary in May 2016, but some of his detractors within the Republican Party still hoped to persuade delegates to back Mr. Cruz at the national convention in Ohio that summer. That effort failed.

Since then, the two have joined forces, and Mr. Cruz has at times vociferously defended Mr. Trump. But the book goes into extensive detail on the various smears and humiliations of both Mr. Cruz and his wife, Heidi, that Mr. Trump doled out. That included extensive efforts by The National Enquirer, run by Mr. Trump’s ally David J. Pecker, to dig up dirt on Mr. Cruz.