WASHINGTON—President Donald Trump ousted his communications director after only 10 days and introduced his new chief of staff, a former Marine Corps general who has the task of imposing more discipline in the West Wing, following one of the most turbulent weeks of the administration.

Anthony Scaramucci was removed from the communications director post on Monday, becoming the seventh major administration official to leave in Mr. Trump’s first six months. Mr. Scaramucci was ousted at the urging of the new chief of staff, retired Gen. John Kelly, in one of his first official acts in the job, two administration officials said. Mr. Kelly previously ran the Homeland Security Department.

Newsletter Sign-up Capital Journal Scoops, analysis and insights driving Washington from the WSJ's D.C. bureau. PREVIEW

Mr. Kelly urged Mr. Scaramucci to resign during a one-on-one meeting in his new office shortly after being sworn-in at a Monday morning White House ceremony, the officials said. Mr. Scaramucci’s removal was designed to better organize a White House that has been riven by competing factions, they said.

The president is “tired of the chaos and the confusion” in the West Wing, said Newt Gingrich, the former House speaker who advises the president. He said the president has been ruminating about the chief-of-staff change for weeks, and is prepared to empower Mr. Kelly in a way that his predecessor, Reince Priebus, wasn’t. Mr. Priebus left the position last week.

“Trump, of course, reserves the right to cause chaos himself, but he likes an orderly system,” Mr. Gingrich said. “That’s how his golf courses work: He thinks the cooks should be cooking, the caddies should be caddying. But that doesn’t restrict him.”

Mr. Trump has told Mr. Kelly that all White House officials—including advisers such as chief strategist Steve Bannon and family members such as son-in-law Jared Kushner—will report directly to the chief of staff, said press secretary Sarah Huckabee Sanders at Monday’s news briefing.

Yet Mr. Kelly’s authority may also face limits. Mr. Trump’s communicating over Twitter, at times on issues far removed from the White House’s top legislative priorities or stated agenda, has proven difficult for previous senior staff members to influence or curb. And the White House is populated by two members of the president’s family—Mr. Kushner and Mr. Trump’s daughter Ivanka, a White House adviser—which could complicate the hierarchy, even if they technically report to the chief of staff, according to past White House veterans.

“It’s easy for a chief of staff to say to Anthony Scaramucci that you’re wrong and you’re gone,” said Ari Fleischer, press secretary under former President George W. Bush. “When it’s the president’s daughter, you can say you did it wrong, but you can’t say you’re gone.”

After Mr. Scaramucci’s departure, which followed the resignation of press secretary Sean Spicer 10 days ago, the White House on Monday sought to project an air of stability going forward. “The president has 100% confidence in all members of his staff,” Ms. Sanders said. “No WH chaos!” Mr. Trump wrote in a tweet Monday morning.

The White House declined to comment on a successor for Mr. Scaramucci and didn’t make Mr. Kelly available for comment.

Scaramucci’s Time in the White House July 21 —Appointed White House communications director

—Appointed White House communications director July 25 —Vows to stop leaks at the White House, threatening to fire staff who leak to the news media

—Vows to stop leaks at the White House, threatening to fire staff who leak to the news media July 26 —Gives an interview to the New Yorker magazine, profanely denouncing White House colleagues, including Chief of Staff Reince Priebus and Chief Strategist Steve Bannon

—Gives an interview to the New Yorker magazine, profanely denouncing White House colleagues, including Chief of Staff Reince Priebus and Chief Strategist Steve Bannon July 27 —Says his relationship with Mr. Priebus may be irreparable, comparing them to the Biblical brothers Cain and Abel

—Says his relationship with Mr. Priebus may be irreparable, comparing them to the Biblical brothers Cain and Abel July 28 —President Trump announces he is replacing Mr. Priebus with Homeland Security Secretary John Kelly

—President Trump announces he is replacing Mr. Priebus with Homeland Security Secretary John Kelly July 31—Removed from his post at Mr. Kelly’s urging

Republicans expressed hope that Mr. Kelly will be able to impose discipline and order. Sen. Orrin Hatch (R., Utah) said the appointment of a general as chief of staff had tamped down “a lot of the screaming and shouting down there.”

Mr. Scaramucci, 53 years old, is the founder of hedge-fund investing firm SkyBridge Capital and a hedge-fund conference known as SALT. Known as “The Mooch,” Mr. Scaramucci previously hosted a financial TV show on Fox Business Network and had been a frequent guest advocating for Mr. Trump on cable news shows. Mr. Scaramucci, who has known the president for two decades, is a longtime Republican donor who eventually backed the Trump campaign in 2016 after previously supporting two other presidential candidates.

Mr. Scaramucci’s ouster came four days after the New Yorker magazine published an expletive-filled interview with him, in which the Wall Street financier attacked other top staffers in the White House, including Messrs. Priebus and Bannon.

Ms. Sanders said Monday that the president felt Mr. Scaramucci’s comments in the interview were “inappropriate for a person in that position.” She declined to answer a question about whether Mr. Trump regretted hiring him.

Mr. Scaramucci had told fellow White House officials in recent days that he knew it was a possibility that his New Yorker interview could result in him being ousted, said two people familiar with the conversation. But in a White House that has driven an unceasing news cycle for much of the past six months, with one breaking news story quickly overshadowing the last, Mr. Scaramucci told colleagues that he thought it might blow over.

Mr. Scaramucci—who had reported directly to Mr. Trump while Mr. Priebus was chief of staff—had told the president on Sunday that he wanted to report to Mr. Kelly, according to a Republican close to the White House. But Mr. Kelly felt the communications director was unable to be a “team player” and found his comments about his colleagues unbecoming, the person said.

Mr. Scaramucci asked to return to his position at the U.S. Export-Import Bank when he gave his resignation, a White House official said. But Ms. Sanders said in the briefing that Mr. Scaramucci now holds no administration role. Mr. Scaramucci didn’t return a call seeking comment.

Mr. Scaramucci’s press team was given 15 minutes notice on Monday to report to the office of Ms. Sanders, who informed them of the change, said two people who attended the meeting. The communications staff of about 40 people received a similarly urgent notice earlier in July when they were told that Mr. Scaramucci was joining the communications office, and that Mr. Spicer, who resigned in protest over Mr. Scaramucci’s hiring, was leaving. Ms. Sanders said Monday she was “not aware” of any changes to Mr. Spicer’s status in the wake of Mr. Scaramucci’s ouster.

As Ms. Sanders spoke to the press team on Monday, a few feet away from her was Mr. Spicer, said two people familiar with the meeting. Mr. Spicer has been helping with the transition and hasn’t completely moved out of the office. White House counselor Kellyanne Conway and Hope Hicks, director of strategic communications, also attended the meeting and encouraged staff to stay focused on the work, one of the people said.

As news of the ouster emerged, Mr. Kelly sat in the White House’s East Room for a planned Medal of Honor ceremony. The chief of staff chatted with Treasury Secretary Steven Mnuchin ahead of the ceremony and appeared in good spirits.

Top advisers to Mr. Trump, including Mr. Kushner, were supportive of Mr. Kelly’s move, according to a White House official.

Mr. Scaramucci was the administration’s second official communications director. Mike Dubke, who previously held the post, resigned in May.

White House officials had spent the weekend anticipating further shuffling, as Mr. Kelly took control of an often-turbulent West Wing.

One concern that may now be alleviated: Mr. Scaramucci’s vow last week to fire the entire communications office if he couldn’t determine which officials were leaking to the media.

Mr. Kelly’s challenge at the White House will be to convince the president to stick with a new system, Mr. Gingrich said.

“It will be interesting to see how he deals with Trump,” the former speaker said. “He’ll totally dominate the staff. He’s already communicating that there’s a new sheriff in town. He gets sworn in, goes to the cabinet meeting, and then calls into his office the first guy he’s going to wipe out. Pretty good day.”

—Ted Mann, Siobhan Hughes and Shelby Holliday contributed to this article.

Write to Rebecca Ballhaus at Rebecca.Ballhaus@wsj.com and Michael C. Bender at Mike.Bender@wsj.com