The right-handed opener was out for 102 as he top scored in a New Zealand innings which left Sri Lanka with a challenging target at the beach resort town. Kane Williamson and Ross Taylor both made 61 while Luke Ronchi was not out 37. More on New Zealand vs Sri Lanka series:
Williamson, again leading New Zealand with Brendon McCullum still sidelined by a back injury, had looked in good touch until he was undone by a poor ball from Tillakaratne Dilshan going down the leg side.
Williamson tried to help the ball on its way but only succeeded in propelling it to wicketkeeper Dinesh Chandimal. Guptill was also dismissed by a poor shot when he lobbed Nuwan Kulasekara, Sri Lanka's most successful bowler, straight to Thisara Perera at long on.
New Zealand were 206 for 3 after 38 overs when Guptill was removed and added 82 off the last 10 overs. Guptill had been out of form when New Zealand toured Australia in November but has found his touch since returning home.
His 102, which included nine fours and three sixes off 109 deliveries, elevated him into an elite group with Nathan Astle and Taylor as the only New Zealanders to score 10 or more ODI centuries.
The milestone comes after innings of 79, 93, 30 and 27 in the previous ODI matches and a century in the first Test against Sri Lanka. New Zealand won the Test series 2-0 and lead the ODI series 2-1 with one match washed out.
Sri Lanka, looking to square the series, won the toss and put New Zealand into bat with immediate success when Tom Latham was out in the first over without scoring.
New Zealand vs Sri Lanka: Fourth ODI abandoned due to rain
Revived Sri Lanka turn tables on New Zealand in third ODI
Martin Guptill's blazing 93 helps New Zealand smack Sri Lanka in second ODI
Martin Guptill shines as New Zealand thrash Sri Lanka in first ODI
The right-handed opener was out for 102 as he top scored in a New Zealand innings which left Sri Lanka with a challenging target at the beach resort town. Kane Williamson and Ross Taylor both made 61 while Luke Ronchi was not out 37.
More on New Zealand vs Sri Lanka series: