She greeted a group of school children waving miniature Chinese and American flags, handing out stuffed toy eagles after watching the children sing a Chinese folk song in front of the panda enclosure.
“Thank you very much,” she said.
Melania then signed a panda print, writing: “Thank you to the Beijing Zoo! Wonderful to meet Gu Gu! Melania Trump”.
Melania will later on Friday visit the Mutianyu section of the more than 20,000 km (12,400 mile) long Great Wall, a UNESCO World Heritage Site.
As with previous first ladies, Melania has used her platform to champion public causes such as the prevention of childhood bullying and combating the opioid epidemic in the United States.
Playing a prominent supporting role on the president’s multi-leg Asia visit, she gained traction on Chinese social media with netizens comparing her with China’s glamorous first lady Peng Liyuan and remarking on the apparent ease with which she navigated the ancient cobblestones of the Forbidden City in super-high stilettos upon their arrival in Beijing on Wednesday.
Accompanied by Peng, Melania watched a cultural performance, painted pandas and participated in a cooking class at a primary school on Thursday.
Many on China’s Twitter-like Weibo praised Melania’s grace and sense of style - as well as her cultural sensitivity.
While in China, she largely appeared in austere coats and dark gowns from Dolce & Gabbana and Alexander McQueen, in contrast with the magenta Delpozo outfit and electric-blue heels she wore upon landing in South Korea days before.
But most in China said they remained bigger fans of their own first lady, who is often referred to affectionately online as Peng Mama, which roughly translates as Mother Peng.
“I still think Mama oozes more grace, while also exuding a motherly air!” one Weibo post said.
Chinese social media sites are typically policed even more heavily than normal during important political events, with negative or sensitive comments swiftly blocked or removed by internet censors.
As Donald Trump departed Beijing on Friday, he said on Twitter that his wife’s next stop after China would be Alaska where she would “greet our AMAZING troops”.
However, Trump’s daughter and advisor Ivanka, who is very popular in China, did not accompany her father in Beijing, to the disappointment of her Chinese fans.
More about: #Melania-Trump