His departure follows several others last month. Tera Dahl, the deputy chief of staff at the N.S.C. and a former writer for Breitbart News, which was run by Mr. Bannon before he joined the White House staff, left for a post at the United States Agency for International Development.
Later in the month, in separate developments, Derek Harvey, the top Middle East adviser, and Rich Higgins, the director of strategic planning, were each pushed out.
Mr. Higgins was forced out after writing a memo arguing that Mr. Trump was being subverted by an array of foreign and domestic enemies, including globalists, bankers, officials of the “deep state,” Islamists and those questioning interactions between Trump campaign officials and Russia, according to a report in The Atlantic magazine.
All four officials were considered Trump allies who shared the antiglobalist views of Mr. Flynn and Mr. Bannon. General McMaster, whose relationship with the president has been strained at times, has long wanted to remove the pro-Flynn hard-liners from his staff. First to go was K. T. McFarland, a former Fox News analyst, who was pushed out as deputy national security adviser in May and nominated to be ambassador to Singapore.
The latest moves come at a time of heightened unease in the world, punctuated by North Korea’s recent intercontinental ballistic missile test, and continued uncertainty about the leadership and direction of the council, which was created to provide presidents with in-house guidance on foreign and military affairs.
Mr. Trump, according to several administration officials, has been considering a shake-up that could include appointing Mike Pompeo, the C.I.A. director, to take over as national security adviser, while sending General McMaster to command forces in Afghanistan. Such a move could earn General McMaster a fourth star.
NBC News reported on Wednesday that the president recently suggested that Gen. John W. Nicholson Jr., the commander of American-led forces in Afghanistan, be fired. White House officials have said the president has yet to decide on any new moves.
Mr. Trump has been considering a new strategy for Afghanistan, but it has become mired in his frustration over the options he has been given. General McMaster presented the president with a plan to bolster the effort in Afghanistan after a stormy meeting of national security officials, only to have Mr. Trump reject it. The president has publicly asked why the United States should still be in Afghanistan after nearly 16 years.