The setting was Cape Coast Castle, a 17th century structure overlooking the Atlantic on the coast of the West African nation of Ghana.
Trump was guided through an hour-long tour of a former slave holding facility on Ghana's coast, an experience she described as being "very emotional".
He called her "Your Excellency", and said: "We welcome you to Cape Coast and hope your short stay will be a memorable one".
But there were signs that the soft diplomatic push was yet to take off locally, as comparisons were drawn to the visit of former United States president Barack Obama and his family in 2009. Obama said it was a reminder of "the capacity of human beings to commit great evil".
Mrs. Trump spent 10 minutes inside the cramped male slave dungeon.
A plaque at the Ghana fortress commemorates Obama's visit.
President Donald Trump has not visited Africa since taking office in 2017. "It's really a tragedy", she said.
US restricts visas to unmarried gay diplomats
Most diplomats affected come from countries where same-sex marriage is legal, another official said, without providing numbers. And unmarried partners who aren't yet in the United States will not be eligible for visas to move there.
Melania Trump walks at the Cape Coast Castle, a former slave trading fort, in Cape Coast.
Mrs Trump and Rebecca Akufo-Addo, the First Lady of Ghana, wave to flag-waving children during an arrival ceremony after landing at Kotoka International Airport in Accra October 2, 2018.
Before the visit, Mrs. Trump visited nearby Emintsimadze Palace to participate in a traditional ceremony where a regional tribe leader granted her permission to tour the palace.
They exchanged gifts: a Chippendale silver tray embossed with an image of the White House inside a leather case signed by "First Lady Melania Trump" for Akufo-Addo, and Kente cloth and artifacts for Mrs. Trump, according to her spokeswoman, Stephanie Grisham.
She added that it was a "special place".
Mrs. Trump arrived at the castle after an approximately 2 1/2-hour early morning drive from Accra, the capital city, where she has stayed since opening her first extended global trip as first lady on Tuesday.
The first lady saw how babies are weighed - they're placed in sacks that are then hung from a hook attached to a scale.
She also said she will use the trip to find out how the U.S. can continue working together with Malawi to support a USAid programme that is focussed on children's education.