The two made inappropriate comments or sent inappropriate texts, officials said. Another group of 10 were flagged for reasons unrelated to recent events in the Capitol.
Officials declined to provide any details about the vetting that detected the Guard members, who are from different states.
The acting defense secretary, Christopher C. Miller, said on Sunday that the F.B.I. was assisting the U.S. military in vetting more than 25,000 National Guard troops being deployed to assist in protecting the Capitol and areas in central Washington for potential security concerns.
An Army spokesperson declined to provide any information on the two National Guard troops or the vetting procedures, citing operational security, and referred all questions to the U.S. Secret Service.
The announcement of their removal comes as the Pentagon is intensifying efforts to identify and combat white supremacy and other far-right extremism in its ranks as federal investigators seek to determine how many military personnel and veterans joined the violent assault on the Capitol on Jan. 6.
The F.B.I. investigation into the Capitol siege, still in its very early stages, has identified at least six suspects with military links out of the more than 100 people who have been taken into federal custody or the larger number still under investigation. They include a retired Air Force lieutenant colonel from Texas, an Army officer from North Carolina and an Army reservist from New Jersey. Another person with military service was shot and killed in the assault.
The military’s examination of its ranks marks a new urgency for the Pentagon, which has a history of downplaying the rise of white nationalism and right-wing activism, even as Germany and other countries are finding a deep strain embedded in their armed forces.
Federal officials are vetting thousands of National Guard troops arriving to help secure the inauguration. Of the 21,500 Guard personnel who had arrived in Washington by Monday, any who will be near President-elect Joseph R. Biden Jr. and Vice President-elect Kamala Harris will receive additional background checks, a standard procedure to counter insider threats that was also taken before President Trump’s inauguration in 2017.
Defense Department officials say they are looking into stepping up the monitoring of social media postings from service members, in much the way companies do with their employees.
Ashli Babbitt, who was shot and killed trying to climb through a door in the Capitol, was an Air Force veteran with a robust social media presence.
The reckoning at the Pentagon comes as retired Gen. Lloyd J. Austin III is poised to become the nation’s first Black defense secretary, an ascension that, depending on how General Austin decides to proceed, could either sharpen or blur the American military’s decades-long battles with racial inequality and white supremacy. General Austin’s confirmation hearings begin on Tuesday, and lawmakers will most likely press him on how he plans to tackle extremism in the ranks.
The "cancel culture" has apparently hit our military. We have first hand reports that the inquisition of soldiers, both in Washington and locally, has been very extensive and many more than twelve have been reprimanded for simply attending Trump's speeches and for posts on social media.