The 38-year-old has managed just 66 runs in seven innings since scoring a hundred against Australia in Dubai last month following his recall to five-day cricket.
The Abu Dhabi Test is Hafeez’s 55th since making his debut against Bangladesh in Karachi in 2003. He has so far scored 3,644 runs with 10 centuries and 12 half centuries.
“I feel time is up,” said Hafeez. “I am announcing my retirement and feel happy that I worked hard in my career.”
A few months back Hafeez had decided to announce his retirement from cricket but wife Nazia and former Pakistan fast bowler Shoaib Akhtar stepped in to persuade him he still had a role to play.
Hafeez was dropped from the Test side after faring poorly in the first three matches of Pakistan’s series in England two years ago, before being recalled for series against Australia in October.
He celebrated his recall with a century in the first Test against Australia in October and later revealed that his wife had persuaded him not to quit the sport.