Truex had dominated the race before surrendering the lead late and then pushed hard to regain it, but ended up finishing 0.7 seconds behind Hamlin, who notched his second Sprint Cup win of the year.
Hamlin also won at Phoenix last month.
Truex, meanwhile, fell short in his bid to snap a 174-race winless streak and register his first victory since 2007 at Dover.
Ray Liotta sues skin care company over use of likeness
Boston schools pull out free condoms over wrapping complaints