Mr. Bannon also helped bring Mr. Kelly into the administration during the transition, and was among those who supported his move to chief of staff, an official familiar with his position said.

Mr. Priebus’s departure was announced 15 hours after the president’s signature drive to repeal his predecessor’s health care program collapsed on the Senate floor and a day after an ugly feud with Mr. Scaramucci erupted in a public airing of the deep animosities plaguing the White House. Mr. Priebus had collaborated with his ally, Speaker Paul D. Ryan, on health care and pushed a bill through the House only to watch it crater in the upper chamber.

“My view is Reince was very well liked by the president, but Donald Trump is a guy who’s all about results, and he will always be looking not only at everyone around him and their results, but his own results,” said Christopher Ruddy, the chief executive of Newsmax Media and a friend of the president’s. “I think he’s taking stock and seeing that this health care thing that was promised to him by Reince and Paul Ryan was not properly developed. In my view, he’s a disappointed customer.”

Mr. Priebus, a former chairman of the Republican National Committee, represented the establishment that Mr. Trump had run against and never won the president’s full confidence nor was granted the authority to impose a working organizational structure on a West Wing that included multiple power centers, including the president’s daughter, Ivanka Trump, and son-in-law, Jared Kushner. Always seeming to be on the edge, Mr. Priebus had hoped to last a full year, but in the end no other White House chief of staff has been forced out after such a short tenure.

Mr. Kushner soured on Mr. Priebus, partly because of what he viewed as the shortcomings of Sean Spicer, an ally of Mr. Priebus’s who was the White House press secretary until last week. Other top aides bristled at Mr. Priebus’s demeanor or suspected that he was undermining them, while an alliance of convenience with Mr. Bannon seemed to fade in recent weeks.

Mr. Trump signaled Mr. Priebus’s fate a week ago by hiring Mr. Scaramucci over the chief of staff’s objections. Mr. Priebus had blocked Mr. Scaramucci from joining the White House staff for six months, and Mr. Spicer resigned in protest.

Mr. Priebus and Mr. Spicer had told the president that they believed Mr. Scaramucci, a gregarious but edgy hedge fund manager and fund-raiser, lacked the required political experience and organizational skills. In the end, however, those warnings fell on deaf ears and, adding insult to injury, Mr. Scaramucci made clear when he was hired that he reported not to Mr. Priebus, but directly to the president.