Hamlin's Toyota led for 150 of the 300 laps at the one-mile New Hampshire Motor Speedway on Sunday. His communication wasn't quite as good.
Kahne, who finished second two weeks ago at Kentucky to Brad Keselowski, went ahead to stay during a restart on the 240th lap when Hamlin spent extra time in the pits as his crew changed all four tires.
Hamlin wanted just two new ones.
"Darian asked me how much of the tires I felt I'd used up. I felt like I had used up a substantial amount," he said. "[I said] give me tires and no adjustments. He thought I meant four tires. Nothing's a given. Even though it looked like we had one in the bag if we took two tires, you never know."
Kahne doesn't feel he stole a victory.
"I wouldn't say 'stolen.' We ran in the top four the whole race," he said. "We were in pretty good shape, [but] if he was to keep the track position, I never would have passed him."
Hamlin's longer pit stop left him all the way back in 13th place, but he kept passing cars until only Kahne remained in front. Then he simply ran out of miles and Kahne won by 2.738 seconds.
It was the 14th win of Kahne's career and first since May 27 at Charlotte. Clint Bowyer, Dale Earnhardt Jr. and Keselowski rounded out the top five.
The victory enhanced Kahne's chances of qualifying for the Chase, the last 10 races of the season in which the top 10 drivers in the point standings win automatic berths. Two additional spots go to the drivers with the most wins who are ranked 11th to 20th in points.
Kahne went from 16th to 12th, and his two wins are more than anyone in the second group of 10.
1. M. Kenseth 707
2. Earnhardt Jr. 691 -16
3. G. Biffle 667 -40
4. J. Johnson 656 -51
5. D. Hamlin 628 -79
6. K. Harvick 622 -85
7. T. Stewart 618 -89
8. M. Truex Jr. 617 -90
9. C. Bowyer 614 -93
10. B. Keselowski 613 -94
11. C. Edwards 567 -140
12. K. Kahne 547 -160