He accompanied Mr. Trump to the White House and became his chief strategist. With an office in the West Wing and a direct line to the Oval Office — he initially reported to no one but the president — he seemed well positioned to wreak havoc on the political institutions and leaders he railed against as too corrupt and self-serving.

But after repeatedly clashing with Ivanka Trump, the president’s eldest daughter, and Jared Kushner, her husband and Mr. Trump’s senior adviser, Mr. Bannon was pushed out after less than eight months with the administration. Five months later, a clash with another Trump — Mr. Bannon called Donald Trump Jr.’s meeting with Russians last year at Trump Tower in Manhattan “treasonous” — cost him another job.

No one has been more closely identified with the Breitbart website or had more to do with emboldening its defiant editorial spirit than Mr. Bannon did after its namesake, Andrew Breitbart, died of a heart attack in 2012. In Washington, Mr. Bannon works and lives part time in a townhouse nicknamed the Breitbart Embassy.

In the statement announcing his move, Mr. Bannon said that he was “proud of what the Breitbart team has accomplished in so short a period of time in building out a world-class news platform.”

Once outside the administration and free to pursue his political enemies, Mr. Bannon set out on an audacious mission to challenge Republican incumbents he deemed insufficiently loyal to Mr. Trump’s agenda. He vowed to replace Senator Mitch McConnell, the Republican leader, and started backing far-right candidates, some with questionable backgrounds and losing track records at the polls.

His full-throated, unfailing support of Roy S. Moore in Alabama even after allegations surfaced that the former judge preyed on women as young as 14, ended in an embarrassing setback: The state sent a Democrat to the Senate for the first time in a generation.

Several people with knowledge of the dynamics at Breitbart said that Mr. Bannon had lost the confidence of executives and writers who had been fiercely loyal to him as he helped transform the website from a scrappy start-up to one of the biggest and most antagonistic megaphones on the right.

But that confidence faded in recent days and weeks as they came to believe he displayed serious lapses in judgment, according to interviews with half a dozen people close to the situation. Some associates and friends described Mr. Bannon as being detached from reality, unable or unwilling to grasp the severity of his falling out with the White House and its potential effect on Breitbart as a business.

His situation at Breitbart grew untenable, said one person close to the situation, in part because Ms. Mercer, whose family funds conservative causes with their hedge fund wealth, became concerned that she could face legal exposure. She feared that some of the website’s cheerleading coverage of populist conservative campaigns — like the Senate race in Alabama — could be construed as corporate contributions to those candidates, which are barred under federal election law.

Numerous people who have worked with Mr. Bannon over the past few months said that his attitude lately had grown more imperious and aloof than normal. And his outward lack of any emotion about his messy public breach with the president and the Mercer family struck some not as the calloused indifference of a political operative but as nihilistic.

When Mr. Trump first denounced Mr. Bannon last week, saying, “He not only lost his job, he lost his mind,” Mr. Bannon insisted to his writers and editors at Breitbart that it would all blow over. When reports began circulating that Ms. Mercer had cut him off, he denied it outright. And when friends started asking him about rumors that his job was in jeopardy, he insisted that everything was fine. “The Mercers haven’t given me money in years,” he told multiple people, playing down their significance in his work and insisting that an initial $10 million investment in the website was all they had put up.

In fact, recent tax filings suggest how difficult it will be for Mr. Bannon to fill the void left by the Mercers. The Mercer Family Foundation has donated more than $100 million over the past decade to mostly conservative nonprofit groups, including nearly $6 million to one that Mr. Bannon helped found, the Government Accountability Institute, which has sought to distance itself from Mr. Bannon in recent days.

Mr. Bannon refused to admit any missteps or lapses in judgment, people close to him said.

Despite putting his name on a statement in which he expressed regret — but did not apologize — for his comments about Mr. Trump’s son, he resisted uttering any words of contrition until an unusual statement went out Sunday morning.

While Mr. Bannon edited and approved the version that ultimately became public, an associate sent out the statement without his knowledge, according to three people familiar with the situation. And when he learned that it had been given to Axios, a website read by Washington insiders, he was furious and blamed his colleagues for overreacting, these people said.

Envisioning Breitbart without Mr. Bannon — or Mr. Bannon without Breitbart — was almost inconceivable a month ago. Inside the Breitbart Embassy on Capitol Hill, where photographs of Mr. Breitbart still hang on the wall and half-filled coffee mugs emblazoned with the website’s block “B” logo clutter the kitchen, Mr. Bannon’s presence is just as prevalent.

Upon entering, visitors would see a table stacked with copies of the Time magazine from last year with Mr. Bannon on the cover under the headline “The Great Manipulator,” along with other articles that have chronicled his rise to national prominence. On one ground-floor wall is a picture of a honey badger, the animal Mr. Bannon has claimed as his mascot because of its savage and relentless pursuit of prey.

Friends of both Ms. Mercer and Mr. Bannon have described their rupture like “a bad divorce.” But Ms. Mercer was just one person among a growing list of powerful onetime allies whose backing Mr. Bannon had lost in recent months. In addition to disparaging Mr. Bannon as “Sloppy Steve” and calling into question his relevance during the 2016 presidential campaign, Mr. Trump blessed moves by the White House to further ostracize Mr. Bannon. And in the words of one associate of the president’s, he wanted “a scorched earth approach.” Sarah Huckabee Sanders, the White House press secretary, took the unusual step last week of suggesting that Breitbart remove Mr. Bannon.

Over the weekend, the White House dispatched Mr. Trump’s allies on Capitol Hill and key members of the administration to the Sunday talk show circuit to defend the president and attack Mr. Bannon’s credibility. The most vocal was Stephen Miller, who worked closely with Mr. Bannon in the White House and was someone Mr. Bannon considered a protégé. Mr. Miller appeared Sunday on CNN and declared Mr. Bannon’s comments in the book by the journalist Michael Wolff “grotesque” as he played down the significance of Mr. Bannon’s role in the administration.

Mr. Bannon’s expression of regret did little to soothe the anger at the White House. Asked on Monday whether the statement, in which Mr. Bannon said the younger Trump was “a patriot,” had changed anything, the deputy White House press secretary, Hogan Gidley, balked.

“I don’t believe there’s any way back for Mr. Bannon at this point,” he said.