In 2000, cable news’s transformational star — a telegenic scold who knew wrong from right as sure as he knew that a break from “traditional values” would be this nation’s ruination — wrote the following words in his book “The O’Reilly Factor”:

“Sure, sex has been getting us in big trouble since the Garden of Eden. Most of us can’t have a happy, successful life without it, but you have to control this powerful force or it will control you, and maybe cause you to lose the things in life that are most important to you.”

He went on: “In today’s world, perhaps more than ever before, sex is being used as a kind of currency. Some people barter sexual favors for a push up the ladder to success.” While that might “work in the short term,” he warned, “in the long term, sexual exploitation almost always leads to disaster.”

Nearly 17 years later, that writer, the Fox News host Bill O’Reilly, is flirting with disaster as never before. And it’s all because of allegations — which he denies — that he lost control of those same libidinous forces he warned about all those years ago.

With news in The New York Times this month that women received financial settlements after accusing him of pursuing sexual relationships with implicit promises to help their careers (or hurting them when rebuffed), he is in danger of losing the things that are most important to him: his longtime perch in the Fox News prime-time lineup, from which he has dominated the ratings for the better part of the new millennium; the lucrative book and public speaking deals that his TV success powers; and his legacy and reputation.

As of this weekend, Mr. O’Reilly’s future was balancing between two competing forces.

On one hand, there was the question of whether Fox News and 21st Century Fox could gut it out and stand by Mr. O’Reilly in the face of mounting advertiser defections and internal and external pressure to show that they are serious about fostering a modern work environment that treats women as equals (yes, in 2017, this is still an issue).

By the end of last week it was becoming hard to square 21st Century Fox’s different responses to two sets of sexual harassment allegations. When the Roger Ailes scandal hit last summer when a number of women came forward to describe alleged harassment, the company opened a special investigation that quickly led to his ouster despite his denials. In the case of Mr. O’Reilly, the company’s public position had seemed to be of the “nothing much to see here” variety. But late on Sunday the company said that the same private law firm that looked into allegations against Mr. Ailes — Paul, Weiss, Rifkind, Wharton & Garrison — is continuing to assist “in these serious matters,” apparently referring to the more recent allegations against Mr. O’Reilly.

But then there’s the other force at play: the O’Reilly brand, with his top-rated news show and the publishing empire that produces books like “Old School,” which topped The New York Times’s best-seller list for hardcovers this month.

That says something big about the relationship he has built with an audience that, until Fox News came along, felt it had nowhere else to turn in a news media landscape that gave them short shrift.

The ideological divide extends as much to media as it does to politics. Loyalty to an opinionated news personality can run deep enough to prompt a committed viewer to overlook potentially damaging details — as my colleague Julie Turkewitz pointed out in her article on devoted O’Reilly fans — or start with a presumption of innocence that might not be extended to somebody on the other side.

It’s especially the case for Mr. O’Reilly, who has made a career out of telling his audience that he is “looking out” for them in a sea of “secular progressive” media types, including at this newspaper. They won’t give it to them straight, he tells viewers, not the way he does.

It helps explain how he can hang onto his audience in the face of allegations that pose such a threat to his persona — charges that surfaced against him with his first known settlement, with the former Fox producer Andrea Mackris in 2004.

After all, Mr. O’Reilly first rose at Fox by riding hard against the ethical lapses of former President Bill Clinton, who, he said at the time, couldn’t “adhere to a decent standard of behavior.”

Mr. O’Reilly remained the star he is by railing against “moral relativism” of liberals who he said encourage people to play the “victim” instead of taking “personal responsibility” for their own decisions.

Now, it’s Mr. O’Reilly who stands accused of showing poor values; of playing the victim, suggesting in a statement that his prominence has made him an easy mark for opportunistic women seeking a payday.

For help, Mr. O’Reilly has turned to none other than a man who took a leading role in defending Mr. Clinton from the likes of Mr. O’Reilly in the 1990s, the former White House aide and Democratic strategist Mark Fabiani.

If you go back and read “The O’Reilly Factor,” the latest turn in his story is rather stunning.

Always opposed to what he has called “politically incorrect nonsense,” he never pretended to be your Sensitive New Age Guy.

Referring to the child Mick Jagger fathered with Luciana Morad when he was married to the model Jerry Hall, Mr. O’Reilly wrote that if the “always perceptive” Ms. Hall “didn’t know after all of this time that her husband would shag a walrus, then she really is as dumb as she looks.” (Ms. Hall is now married to Mr. O’Reilly’s boss and most important protector, Rupert Murdoch.)

And he had this advice regarding talking about sex: “Ladies, if you said yes without being forced, then don’t brag to your co-workers or your homegals.” (For good measure, he re-emphasized the importance of keeping one’s sex life to one’s self, adding, “This especially means you, ladies.”)

But he also offered up homespun advice against getting married “unless you can put your spouse’s needs above your own,” and about how to teach children discipline, table manners, courtesy and kindness.

If anything, Mr. O’Reilly’s moralizing went up a notch in his 2006 book “Culture Warrior,” in which he denounced a “philosophy of confronting harmful behavior by providing a variety of excuses for it.”

The “traditional cultural warrior” — he counted himself one — “believes in the Judeo-Christian code of forgiveness — but with punishment and with penance.” Americans, he wrote, “must continue to uphold standards of behavior that protect people.”

The allegations that my colleagues Emily Steel and Michael S. Schmidt recounted in their explosive article about Mr. O’Reilly last weekend sure don’t fit that code. Among the claims were that he didn’t help a woman up from the ground when she fell after dodging an uninvited kiss from him, and that he then tried to blunt her career prospects.

On Friday, I called my good friend Tracy, a longtime O’Reilly fan, to take her temperature. She is a successful fashion industry executive, she grew up on Long Island and considers herself a moderate Republican. I’m leaving her last name out because she was minding her own business when I reached out, and didn’t ask to enter the national debate over Mr. O’Reilly.

“He just seems like an easy target,” she told me. In a “free for all” environment in which “everyone’s trying to sabotage the other side,” she said, she finds it hard to believe much of anything about anyone these days — Democrat, Republican or Bill O’Reilly. But the bottom line, she said, was, “I trust him.”

That sort of trust is enough to keep people like Tracy loyal to him. What remains to be seen is whether it will be enough to keep the Fox News Channel and 21st Century Fox with him, as well.