Guptill's 66 from 46 balls, which included a 50 from 29 deliveries, gave New Zealand a speedy start in pursuit of India's 296-7.
Nicholls made 80 from 103 balls to add solidity, putting on 106 in an opening stand with Guptill and 53 for the third wicket with captain Kane Williamson (22), who missed the first two matches with a shoulder injury.
De Grandhomme then finished the chase, hitting his half-century from 21 balls and finishing 58 not out in an unbroken 80-run partnership with Tom Latham (32), which carried New Zealand to 300-5.
Not since 1997, in a 3-0 defeat against Sri Lanka, had India been swept in an ODI series containing three or more matches. New Zealand bounced back from its own 5-0 loss to India in the Twenty20 series.
New Zealand began to lose its way in the middle of its innings, quickly losing Williamson, Ross Taylor (12) and Jimmy Neesham (19), slumping to 220-5 in the 40th over.
Wrist spinner Yuzvendra Chahal took 3-47 from his 10 overs as India managed to squeeze New Zealand between the 30th and 40th overs.
But Latham and De Grandhomme patiently batted New Zealand within sight of victory, then burly allrounder De Grandhomme was able to hit out with three sixes and six fours to lift New Zealand to victory with 17 balls to spare.
"An outstanding performance, very clinical," Williamson said.
"India put us under pressure in every game in the series. They managed to do that again in the first half but the way the guys fought back with the ball and perhaps kept India to a par total on that surface, and the cricket smarts in the second half, was outstanding."
Earlier, KL Rahul posted his fourth ODI century and shared two century partnerships to anchor India's innings after it was sent in on losing the toss.
Mayank Agarwall (1) and captain Virat Kohli (9) were out cheaply but Rahul built the innings in partnerships of exactly 100 for the fourth wicket with Shreyas Iyer (62) and 107 for the fifth with Manish Pandey (42).
India looked set for a total well in excess of 300 when it was 161-3 after 30 overs. But it didn't finish as strongly as it should have, adding only 49 for the loss of three wickets in the last 10 overs.
Rahul reached his century from 104 balls and was out with the total 269-5 in the 47th over.
With the ball, only Chahal was able to impose concerted pressure on the New Zealand batsmen. He began by bowling Guptill with a classic leg break which pitched on leg, beat the bat and hit off stump.
India's key bowler, Jasprit Bumrah, went without a wicket in the series, finishing with 0-167 from 30 overs.
"The games were not as clear-cut as the scorelines suggests," Kohli said. "It boils down to those chances we didn't grab.
"All three games, I thought the way we fielded and our composure with the ball I don't think was enough to win games of cricket at international level."