Acting Homeland Security Secretary Kevin McAleenan announced on Wednesday that he has directed an investigation into alleged "disturbing and inexcusable social media activity" by acting Border Patrol agents, saying that "any employee found to have compromised the public's trust in our law enforcement mission will be held accountable."

McAleenan's tweets announcing the probe comes after U.S. Customs and Border Protection said Monday that it is investigating a private Facebook group for current and former agents where users mocked the deaths of migrants and posted sexist and racist jokes about Latino members of Congress, including Rep. Alexandria Ocasio-Cortez, Democrat from New York.

"Reporting this week highlighted disturbing & inexcusable social media activity that allegedly includes active Border Patrol personnel. These statements are completely unacceptable, especially if made by those sworn to uphold the @DHSgov mission, our values & standards of conduct," McAleenan wrote on Twitter Wednesday.

Get Breaking News Delivered to Your Inbox

"I have directed an immediate investigation, and as the @USBPChief has made clear, any employee found to have compromised the public's trust in our law enforcement mission will be held accountable. They do not represent the men and women of the Border Patrol or @DHSgov," McAleenan continued in another tweet.

Matthew Klein, assistant commissioner for the agency's Office of Professional Responsibility, said in a statement Monday: "CBP immediately informed DHS Office of the Inspector General and initiated an investigation."

ProPublica first reported on the private Facebook group, which is called "I'm 10-15," referring to the Border Patrol code for "aliens in custody." According to the report, the page was created three years ago for current and former Border Patrol workers, and has about 9,500 members.

ProPublica posted screenshots and quotes from the page showing members making fun of the deaths of migrants — cases that have drawn intense scrutiny and criticism for the agency.

One thread showed members discussing a harrowing photo of a Salvadoran father and his 23-month-old daughter who drowned in the Rio Grande while trying to cross into the U.S. The picture, which shows their bodies floating in the water, caused an uproar after being published by news organizations nationwide last week.

"I'm not trying to an a$$ but I HAVE NEVER SEEN FLOATERS LIKE THIS," one member of the Facebook group wrote, suggesting the photo could have been "edited." "We've all seen the dems and liberal parties do some pretty sick things…" the user wrote.

Another post shows members shrugging off the death of a 16-year-old Guatemalan boy who died in Border Patrol's custody in May. "If he dies, he dies," one user wrote.

Members ridiculed Ocasio-Cortez and Rep. Veronica Escobar, D-Texas, for their planned visit to a Border Patrol facility outside El Paso. Users called the congresswomen "hoes" and "scum buckets," and one said agents should throw a "burrito at these bitches."

The story broke hours before Ocasio-Cortez arrived for the tour of the Texas facility on Monday. She said the Facebook page shows a deeper and more disturbing problem within the agency.

"This isn't about 'a few bad eggs.' This is a violent culture," she said on Twitter.

Jason Silverstein and Grace Segers contributed to this report