Beijing and Islamabad are hoping to establish a Pakistan-China Economic Corridor, linking Pakistan's southern Gwadar port on the Arabian Sea and China's western Xinjiang region.

The corridor will run through Pakistan's poor Balochistan Province, long plagued by a separatist insurgency, criminal gangs, and Islamist militants.

In his talks with Prime Minister Nawaz Sharif, Xi was also expected to discuss cooperation on Afghanistan and China's fears that Muslim separatists from Xinjiang were linking up with Pakistani militants.

Xi will be in Pakistan for two days and was due to address parliament.

On the eve of his visit, Xi linked economic cooperation with progress on security.

"China and Pakistan need to align security concerns more closely to strengthen security cooperation," he said in a statement to Pakistani media.

"Our cooperation in the security and economic fields reinforce each other, and they must be advanced simultaneously."

According to Ahsan Iqbal, Pakistan's minister for planning and development, China will provide about $34 billion in investment for the energy projects.

Major Chinese companies investing in the energy sector will include China's Three Gorges Corporation and China Power International Development Limited, Pakistani officials said.

Analysts say Sharif vowed to end chronic power blackouts during his 2013 election campaign and will be hoping for an improvement before the next polls in 2018.

The United States has given $31 billion to Pakistan since 2002, according to the Congressional Research Service. About two-thirds was earmarked for security.

Pakistan got $710 million in foreign direct investment in the first nine months of this fiscal year, the central bank said last week.