The three-match series is now tied 1-1 after Zimbabwe recorded their first win over Pakistan in 15 years on Tuesday.
The third and deciding match is also at the Harare Sports Club today.
Hafeez reached his second highest score in one-day cricket off 205 balls and was ably supported by Umar Amin (59) and a late cameo from the swashbuckling Shahid Afridi.
Pakistan upped their scoring rate considerably toward the end of the innings as Afridi smashed an unbeaten 39 off 35 balls, setting Zimbabwe the target of a run per ball to win.
“We wanted to win comprehensively, but we were looking at about 260, we never thought we’d get up near 300. The wicket was a little green at the start, but the conditions improved,” Hafeez said after accepting the man-of-the-match award.
A fiery opening spell from Mohammad Irfan stalled Zimbabwe’s openers initially, but Hamilton Masakadza (24) cut loose before a length ball from Junaid Khan bowled him.
Taylor’s application offered Zimbabwe hope of chasing down the formidable target as he combined first with Sean Williams (37) and then Waller.
However, as Zimbabwe reached 200 in the 39th over, Taylor, well set on 79, top-edged a high ball that Irfan plucked out of the air with one hand, sparking a lower-order collapse.