"Meeting those children and understanding their different way of life is why I wanted to travel here", Trump said.
Mrs. Kenyatta, I look forward to visiting your country and know that together, we will be able to do great things on behalf of children.
Everywhere she has visited during her trip across Africa this week, first lady Melania Trump has cradled infants and held children.
The US First Lady Melania is expected to leave the country on Friday morning.
She went directly to Chipala Primary School in Lilongwe, where she watched teachers carry out lessons to help the students learn English and the Chichewa language.
Her office has described the trip as a "showcase" for the work of the US Agency for International Development (USAID), even at a time when her husband's government is looking to slash US aid across the world.
Melania will complete her solo worldwide trip in Egypt on Saturday before returning to the United States.
The first lady then ducked inside to observe an English classroom with 186 children in attendance.
One said #MELANIATOO, with the "ME" in bold black.
During a ceremony at the school, the first lady participated in giving the school 1.4 million books. "It is a handsome thing to see", Trump tweeted. "Thank you for educating them to "be best" and to grow up into educated adults for generations to come".
First Lady Melania Trump (L) and the first lady of Malawi Gertrude Maseko walk at the State House in Lilongwe, on October 4. After the readings, she was encircled by the singing children and danced some more.
Kenya, the home of Obama's father, is also one of the world's biggest fans of the Trump administration, according to a report by the Pew Research Centre on America's global image.