The multi-billion-dollar Belt and Road Initiative, the pet project of Xi, has become a major stumbling block in India-China relations as the CPEC has been listed as its "flagship project".
India has protested to China over the CPEC, which is being built through Pakistan-occupied Kashmir (PoK).
In his message to Alvi, Xi noted that "the strategic significance of the China-Pakistan relations is more prominent under the current circumstances, and the two countries should support each other more staunchly and conduct deeper cooperation," state-run Xinhua news agency reported.
His message to Alvi comes in the midst of reports of unease in Beijing over how the new government headed by cricketer-turned-politician Imran Khan would approach over USD 50 billion Chinese investments in various projects under the CPEC connecting China's Muslim-majority Xinjiang province with Gwadar port in Pakistan.
Khan in the past criticised former prime minister Nawaz Sharif for the lack of transparency and corruption in the CPEC projects. Newly appointed Finance Minister Asad Umar has promised to bring about transparency to the CPEC projects whose details remained closely guarded secrets.
Also Pakistan, which is facing serious financial crisis, is currently under heavy pressure from the US to give up its support to the Taliban and prevail on it to halt violent attacks in Afghanistan.
"China and Pakistan are good neighbours, good friends and good brothers that treat each other with all sincerity and share weal and woe, and the friendship between the two countries has remained solid and kept growing despite the fluctuating international situation," Xi said.
He recalled that China and Pakistan jointly decided to enhance their bilateral relations to an "all-weather strategic cooperative partnership" when he visited Pakistan in 2015 during which he launched CPEC.
Xi said that he highly values the development of the China-Pakistan relations and is willing to join hands with Alvi to further enhance the all-weather strategic cooperative partnership and build a closer China-Pakistan community of shared future.