Kahne took control of the top spot after coming out of the pits first during a round of stops under caution.
Hamlin, who led for 150 laps, charged through the field late in the race and tried to re-take the advantage on the second-to-last lap, but went too far wide between turns 3 and 4.
That misplay handed a 2.7-second victory to Hendrick Motorsports' Kahne, who corralled his second victory of the season.
The victory gave Kahne -- ranked 12th overall -- first place in the wild card rankings for the championship Chase.
UPI horse racing weekend preview
Bo Jackson: I can't help Jameis Winston anymore