Kenyatta, who took office in March after a contested election, met Xi following an elaborate ceremony outside Beijing's ornate Great Hall of the People.
The Kenyan leader has been charged by the International Criminal Court (ICC) with crimes against humanity over violence following elections in 2007, which claimed some 1,100 lives and displaced around 600,000 people.
The post-poll riots quickly turned into ethnic killings and reprisal attacks, plunging Kenya into its worst wave of unrest since independence from Britain in 1963.
China's influence in Africa -- where critics say it ignores human rights issues -- has risen along with its global clout. The continent has become a key supplier of natural resources, helping fuel the Asian giant's rise to become the world's number two economy.
More From This Section
Xi, who made the continent part of his first foreign trip after taking office as head of state earlier this year, congratulated Kenyatta on his election victory.
Kenyatta -- the son of founding leader Jomo Kenyatta -- noted that Kenya was celebrating the 50th anniversary of its independence this year.
"During that eventful period, China and her people supported us in our quest for freedom, as it did many other liberation movements in Africa," he said.
Xi lauded China's historical ties with Kenya, specifically mentioning the 15th century voyages of Chinese Muslim admiral Zheng He who led expeditions to the east African coast.
The two sides signed six agreements, including memorandums of understanding on trade and economic cooperation and on a railway from Mombasa to Nairobi, but gave no details.