Malik is a former commander of the Peshawar-based XI Corps and did a stint in the Inter-Services Intelligence when the spy agency was headed by Kayani. He replaces top bureaucrat Nargis Sethi, who was given additional charge as the defence secretary in January after former premier Yousuf Raza Gilani sacked the previous incumbent, Lt Gen (retired) Khalid Naeem Lodhi, during a standoff with the army.
At the height of the tensions between the government and the army over a mysterious memo sent to the United States about averting a possible coup in Pakistan, Gilani had sacked Lodhi for "gross misconduct and illegal action".
Sethi, who was considered to be very close to Gilani, was then made the defence secretary. She will continue to hold the post of Cabinet Secretary.
A retired officer from the powerful army has traditionally held the post of Defence Secretary and media reports had suggested that Sethi did not get complete cooperation from the military.
A formal notification about Malik's appointment was issued on Friday.
Malik retired from active service last December and his last sting was as commander of the Peshawar-based corps that is engaged in counter-insurgency operations in the restive northwest.
Malik, who has attended training courses in American institutions, is expected to sign a bilateral memorandum of understanding with the US next week to cover the transportation of supplies to foreign forces in Afghanistan.
The MoU was approved by the cabinet this week.
In another key appointment announced by the government on Friday, Information Group Officer Shafqat Jalil was made press secretary to Prime Minister Raja Pervez Ashraf. He replaced Akram Shaheedi, who was appointed by Gilani.