Gen Sobhi, who is also the Commander-in-Chief of Egypt's Armed Forces, met General Sharif at the General Headquarters (GHQ) to discuss the crisis in Yemen.
The two exchanged views on issues of "mutual interest, regional security and military-to- military bilateral relations."
General Sobhi is in Pakistan to seek military cooperation as a Saudi-led coalition pounded the rebel Houtis in Yemen.
A security official said the worsening situation in Yemen dominated their discussion.
Also Read
Saudi Arabia has asked Pakistan to join its 10-nation coalition against the Shia Houthi rebels, who have captured a number of key Yemeni cities including the capital Sanaa and the southern port city of Aden.
Pakistan is mulling the option of sending troops to Saudi Arabia, which has already asked Islamabad to provide soldiers, fighter jets and warships to fight the rebels.
Egypt also hosted an Arab summit on March 29, where the formation of a unified military force to counter the security threats from Yemen to Libya was announced- an idea floated by Egyptian President Abdel Fattah al-Sisi.
Army said the Egyptian defence minister also visited Joint Staff Headquarters Chaklala and called on General Rashad Mahmood, Chairman Joint Chiefs of Staff Committee.