Hamlin succeeded in pulling away by almost a second over the next 20 laps, but in the final ten Truex was reeling him back in again and had two attempts to dive under Hamlin through turn 3 in the final three laps, while Jimmie Johnson was well back from the battle and just a spectator in third.
"I was a little bit faster than Denny at the end, but he was running against the wall right where I needed to be, and I was just trying to gain a little bit of ground," said Truex. "It was desperation, last-ditch effort, just trying something. There was no chance to make it work."
Despite holding on to second as the chequered flag came out, Truex couldn't conceal his feelings. "I guess if we can be this disappointed with second, it kind of shows how far we've come as a race team," he said.
And at least if Michael Waltrip Racing ha to lose to anyone else, it was to Joe Gibbs Racing, their Toyota stable-mate with whom they have close technical ties this season.
It's the 199th win for the #11 car in the history of the Cup series, with previous drivers making it to victory lane including Cale Yarborough, Ned Jarrett, Darrell Waltrip, Bill Elliott - and a win apiece for Indy 500 champions AJ Foyt, Mario Andretti and Parnelli Jones.
Soon after the chequered flag, and once the victory lane celebrations ended and the crowds and the Sprint Cup team haulers had departed, an eerie change came over Kansas Speedway as a different set of engines fired up on pit road.
Bulldozers began moving in to begin the massive repaving project on the 1.5-mile track surface that will add new variable banking to the circuit for future events. Many drivers had been unhappy to learn of the upcoming repaving, but track president Pat Warren took the media for a tour of the venue over the weekend and pointed out where the asphalt was breaking up. No question, it had to be done.
Penske Racing's Brad Keselowski got to lead the heavy machinery out to begin work - in a military tank, going some 110mph slower than his usual mode of transport here. Naturally - being Keselowski - the whole thing was tweeted, with pictures and video released via social media.
It was nonetheless a sad and poignant moment for the venue, which will never be quite the same again.
Full race results
and Sprint Cup championship standings