seven as they chased England's 258 all out.
With two players injured, they needed 41 runs off the last 25 balls with effectively one wicket in hand.
But Guptill, who had earlier retired with a hamstring strain when he had three runs to his name, hobbled out of the tunnel to provide a vital boost.
With limited mobility, he stood his ground and clouted four fours and a six while McCullum continued to blaze away at the other end to get New Zealand home with seven balls to spare.
Guptill finished on 27 with 24 of his runs coming from the 10 deliveries he faced on his return to the crease.
McCullum, who pulled New Zealand into contention after they slipped well behind the required run rate in the early stages of their innings, was unbeaten on 69 from 61 deliveries.
The win was New Zealand's fifth consecutive ODI victory over England and put them 1-0 up in the three-match series.
England, sent into bat first, produced a carefully crafted start to their innings and were poised for a final onslaught when they reached 220 for four in the 44th over.
But when the big hitting was required, England lost their last six wickets for 38 runs in the space of 37 deliveries.
Ian Bell, Jonathan Trott and Joe Root, who all missed the recently concluded Twenty20 series won by England 2-1, were the chief architects of the solid start to the innings.
After the early departure of Alastair Cook, Bell and Trott put on 84 for the second wicket in their first innings of the tour before Bell was out for 64 when he edged James Franklin to wicketkeeper McCullum.
Trott recovered from a slow start to reach 68 before he was bowled by Kyle Mills after adding 89 with Root for the third wicket. Root went on to make 56.
As the England tail folded the only other players to reach double figures were Jos Buttler (21), Chris Woakes (17) and Graeme Swann (16).
In the process of mopping up the innings, left-arm seamer Mitchell McClenaghan, who took four for 56, left the ground with a side strain before completing his final over and is unlikely to play again in the series.
Franklin was the second best of the New Zealand bowlers with three for 38 while Kyle Mills took two for 32.
New Zealand's response started shakily with BJ Watling out for two on the last ball of the first over and Guptill hobbling from the field soon after.
Ross Taylor and Grant Elliott both made 22 and New Zealand's cause looked decidedly difficult when McCullum came to the crease and Kane Williamson was run out after scoring an impressive 74.
New Zealand were then 132 for four and required 126 off the final 96 balls. Franklin, Nathan McCullum and Andrew Ellis all played brief cameos before Guptill re-entered the fray to help Brendon McCullum seal the outcome.
Woakes was the most successful of the England bowlers taking two for 52 and combined with Ian Bell to run out Williamson.
The second match in the series will be played in Napier on Wednesday.