Lt General Hayat, chief of general staff of the Pakistan Army, held talks with Gen Fang Fenghui, member of China's Central Military Commission (CMC) and chief of the Joint Staff Department, state-run China Military Online reported.
CMC - headed by President Xi Jinping - is the supreme political military organisation which exercises control over all wings of the People's Liberation Army (PLA).
Gen Hayat, who hails from a military family, is among the leading candidates seen as a replacement for Gen Sharif.
His trip is also the first time a senior Pakistani army official is visiting China since the attack on an Indian army base in Uri in September by Pakistan-backed militants killed 19 soldiers and amplified tension between the neighbours.
More From This Section
The Uri attack led to "surgical strikes" by India in which several terrorist "launchpads" across the LoC were destroyed.
China is willing to make joint efforts with Pakistan to achieve development, so as to benefit the peoples of the two countries, the report quoted Gen Fang as saying.
Chinese military is willing to work with Pakistani military to strengthen strategic communication, deepen the pragmatic cooperation in fields such as joint exercises and training, construction of anti-terrorism capability and information sharing, he said.
Fang stressed that the two militaries shall make full use of the Quadrilateral Cooperation and Coordination Mechanism (among Afghanistan, China, Pakistan and Tajikistan) to counter terrorism, and push forward the implementation of China's Belt and Road Initiative as well as the in-depth development of the China-Pakistan all-weather strategic partnership, so as to make positive contributions to safeguarding regional and world peace and stability.
He hoped the two sides can further strengthen their cooperation in various fields especially in defence and security sectors, the report said.
The Pakistani military resolutely supports China to push forward its 'Belt and Road Initiative' and is willing to provide all support for maintaining the security of the USD 46 billion Pakistan-China Economic Corridor (CPEC), he said.