Victory in this day/night clash gave England an unbeatable 3-0 lead in the five-match series after Pakistan were dismissed for 275 with 44 balls to spare.
England’s total surpassed the previous record of 443 for nine by Sri Lanka against the Netherlands at Amstelveen in 2006.
It was also the highest ODI total in a match between two Test nations, topping South Africa’s 439 for two against the West Indies at Johannesburg last year.
In a match of records, opener Hales’s innings on his Nottinghamshire home ground was the highest ever-individual ODI score by any England batsman and together with Joe Root (85) he put on 248 for the second wicket.
Both Hales and Root fell in quick succession to leave England 283 for three in 38 overs.
But an unbroken stand of 161 in 76 balls between Jos Buttler (90 not out) and captain Eoin Morgan (57 not out) ensured the runs just kept coming.
Buttler’s innings featured England’s quickest ever ODI fifty, off just 22 balls, and he hit seven fours and as many sixes in total during his 51-ball knock.
It seemed England would fall short of a new record but the last ball of the innings saw Buttler, the standard bearer for England’s dynamic approach to ODI cricket following their woeful first-round exit at last year’s World Cup, thrash Hasan Ali over extra-cover for four to the delight of a capacity crowd of more than 17,000.
Hales had managed just 145 runs at an average of 18.12 during England’s preceding 2-2 Test series with Pakistan.
That was followed by meagre scores of seven and 14 in the first two ODIs at Southampton and Lord’s respectively.
“I was confident heading into this but it’s been a tough few weeks,” said man-of-the-match Hales.
“It’s pleasing to have won the series after three games but we want to be ruthless and win it five-nil,” added Hales, whose innings finally overhauled Robin Smith’s 167 not out against Australia at Edgbaston back in 1993 as England’s highest individual ODI score.
Delighted skipper Morgan said: “Quite a monumental knock from Alex Hales on his home ground, to score 171 in any form of the game is remarkable.”
Pakistan left-arm fast bowler Wahab Riaz finished with figures of none for 110 in his maximum 10 overs.
It was the second-most expensive return in an ODI, behind Australian Mick Lewis’s none for 113 against South Africa at Johannesburg in 2006.
To make matters worse for Riaz, who often over-steps, he took two ‘wickets’ with no-balls when Hales was caught on 72 and Buttler’s stumps were knocked over when he was on 75.
Pakistan, top of the Test rankings but a lowly ninth in the ODI table, let through a couple of early boundaries to set the tone for a desperately shoddy fielding display.
“I think it was an exceptional innings from Alex Hales and Jos Buttler,” said Azhar Ali, the Pakistan captain.
“On a wicket like this you really need to support the bowlers and that didn’t happen.”
Hales did give a chance on 114 when he flayed leg-spinner Yasir Shah to short extra-cover where Pakistan captain Azhar Ali dropped the head-high catch.
Next ball, Hales hoisted Shah for six.
Hales broke Smith’s record when he clubbed Hasan for four.
But next ball he was lbw to Hasan to end a 122-ball innings including 22 fours and four sixes.
Pakistan’s reply saw Sharjeel Khan make 58, but once the opener holed out off Chris Woakes (four for 41) his side’s slim chance of victory went with him.
Last man Mohammad Amir hit superbly in also making 58 — the highest ODI score by a No 11, beating compatriot Shoaib Akhtar’s 43 against England at the 2003 World Cup in Cape Town.
The left-hander’s fifty took just 22 balls — the same as Buttler and he reached the landmark with three successive well-struck sixes off leg-spinner Adil Rashid.
But he was merely delaying the inevitable and Amir was last man out when caught and bowled by Woakes. (Courtesy AFP)