The first lady's spokeswoman, Stephanie Grisham, said the procedure was successful and that there were no complications. Grisham said Mrs. Trump is at Walter Reed National Military Medical Center just outside Washington and will likely remain there for the rest of the week.
The White House did not offer any additional details on Mrs. Trump's condition.
Mrs. Trump, who has been gradually raising her profile as the first lady, recently hosted her first state dinner and launched a public awareness campaign to help children.
Heading over to Walter Reed Medical Center to see our great First Lady, Melania. Successful procedure, she is in good spirits. Thank you to all of the well-wishers!— Donald J. Trump (@realDonaldTrump) May 14, 2018
With the president watching in the Rose Garden, Mrs. Trump last week unveiled the "Be Best" campaign, which she said will focus on childhood well-being, social media use and opioid abuse.
The first lady, who's 48, lived full time in New York during the administration's opening months so the couple's son, Barron, now 12, would not have to change schools midyear. She and Barron moved into the White House last June and since then the first lady has been raising her public profile.
Mrs. Trump joined her husband last month to host the prime minister of Japan for a two-day summit at the Trumps' Florida estate, and the Trumps hosted the president of France at the White House on a three-day state visit, including a lavish state dinner.
Mrs. Trump also represented the administration at the April funeral of former first lady Barbara Bush.