Hafeez scored three centuries in four One-Day Internationals in the ongoing series against Sri Lanka.
The 33-year-old was dropped from the Test side for the home series against South Africa in October.
He scored only 102 runs in his last 10 Test innings against South Africa and Zimbabwe.
"Hafeez has been rewarded for his excellent form and could not be ignored," a national selector said.
Hafeez, who was set to join the Melbourne team for the Big Bash T20 Cup, will now have to drop his lucrative contract and a PCB source said the board has agreed in principle to compensate the all-rounder.
"Hafeez has been assured he will be get some sort of compensation for missing the big bash tournament," the source added.
Melbourne Renegades had announced that Hafeez would be joining them by January 1.
Fast bowler Mohammad Talha was also recalled after playing his only Test, against Sri Lanka in 2009 in Lahore, which ended abruptly after a militant attack on the visitors.
Pace spearhead Umar Gul was also included after he impressed in the ODI series against the Islanders.
Gul, who returned in the third one-dayer, played for Pakistan after an eight-month layo-ff due to a knee surgery.
The selectors have also retained senior batsman Younis Khan in the Test side despite his poor form in the ongoing domestic tournament.
The first Test of the three match series begins December 31 at Abu Dhabi.
Squad: Misbah-ul-Haq (Capt), Younis Khan, Mohammad Hafeez, Khurrum Manzoor, Ahmed Shahzad, Shaan Masood, Azhar Ali, Asad Shafiq, Adnan Akmal, Junaid Khan, Rahat Ali, Umar Gul, Muhammad Talha, Saeed Ajmal and Abdul Rehman.
Photograph: Gareth Copley/Getty Images
Hafeez, Ajmal help Pak seal ODI series against Sri Lanka
PHOTOS: Morkel removes Dhawan; Vijay, Pujara steady India
Ajmal reprimanded for using 'abusive language, gestures'
Fit-again Morkel removes Dhawan before lunch
Sri Lanka hold nerve to beat Pakistan, level series