The two team mates had been together for most of the 10km run, accompanied by Switzerland's Sven Riederer. But with 1500 metres to go Riederer faded, leaving the Kiwis to battle it out.
The 27-year-old Docherty, world-ranked number one after a fantastic year, was the favourite on paper but Carter gradually applied the pressure and broke clear 500 metres from the end to win in one hour 51.07.73 seconds.
Docherty was second 7.87 seconds back with Riederer dancing across the line in third, 25.53 seconds off the pace and eight seconds clear of fast-finishing Australian Greg Bennett.
The race followed a different pattern from the women's event on Wednesday when two athletes were able to open an early lead after a good swim, as the men's field was heavily bunched exiting the water.
American Andy Potts was first out in a time of 17:49.00 but the rest were close behind and by the time they had negotiated the stiff hill one km into the course, a lead group of 15 was making the pace.
It contained many of the pre-race favourites, including Australian Peter Robertson and Dane Rasmus Henning, winner of the World Cup test event held over the same Vouliagmeni course last October.
By the end of three laps six had got away, Docherty and Carter, Riederer and Swiss colleague Olivier Marceau, Briton Andrew Johns and Frenchman Frederic Belaubre.
Working well together, they were 29 seconds clear of another group of nine after three laps, 32 seconds ahead after four and 44 clear at the end of 40km.
The two New Zealanders and Riederer broke away on the first of three laps on the run, setting a hard pace despite a beating sun bouncing back at them from the road.
It looked as if the crowd would be in for a sprint finish until Carter made his move to pull off by far the biggest victory of his career.