WASHINGTON — She bad-mouthed the defense secretary. She was the hatchet woman for John R. Bolton, the famously combative national security adviser, and drove out staff members from the National Security Council who were deemed insufficiently conservative or loyal.

But in disparaging two members of Melania Trump’s staff who traveled with Mrs. Trump, the first lady, on her trip last month to Africa, Mira Ricardel, a deputy national security adviser, apparently went too far.

In a White House where the drama has been constant, but almost always behind the scenes, an email to reporters on Tuesday from Stephanie Grisham, a spokeswoman for the first lady, was unusually direct: “It is the position of the Office of the First Lady that she no longer deserves the honor of serving in this White House.”

The email was sent less than an hour after Ms. Ricardel appeared at an official White House event with President Trump.