During their talks, Xi pledged that China would continue to support Cuba where possible, calling it a "great and remarkable country" that had overcome obstacles to chart its own path, reported state broadcaster CCTV.
Xi also invited Cuba to join in his pet project, the Belt and Road Initiative, a globe-spanning trade infrastructure programme.
In response, Diaz-Canel said Cuba would take reference from China on developing the domestic economy while renewing its social model.
Communist Cuba was the first country in the western hemisphere to recognise Beijing in 1960.
Beijing is now Havana's top creditor and among its biggest trading partners.
Diaz-Canel, capping a three-day visit, was earlier in Shanghai for a massive import fair with thousands of foreign companies trying to woo Chinese buyers.
Prior to travelling to China, he received a hearty reception from North Korean leader Kim Jong Un in Pyongyang last Sunday, with the two leaders embracing on the tarmac as Diaz-Canel stepped off the plane.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)