The two leaders met in the Russian city of Ufa, where they also led their sides during the meeting.
"Prime Minister Sharif termed friendship with China as a cornerstone of Pakistani foreign policy and appreciated the personal commitment of Chinese President to the China-Pakistan Economic Corridor," according to a statement by the Pakistan government.
Sharif also thanked Xi for the support China has extended to Pakistan for becoming a member of SCO.
He further emphasised that China wants to maintain close ties with Pakistan and is looking forward to Pakistani President Mamnoon Hussain's visit to China.
Xi invited Sharif to the SCO meeting scheduled to take place in Beijing later this year.
It was their first meeting since Xi's visit to Pakistan in April when he announced the USD 46 billion China-Pakistan Economic Corridor, linking western China to Gwadar port in southern Pakistan.