It was Hamlin's second victory in four years at Daytona. He won the big race for the first time since 2016.
Hamlin took the checkered flag for Joe Gibbs Racing one month after Joe Gibb's oldest son and team co-founder, J.D. Gibbs, died following a battle with a degenerative neurological disease. J.D. Gibbs died at the age of 49.
Hamlin, who had a J.D. Gibbs sticker on his No. 11 car, honored him after the race.
"The whole [Gibbs] family, they've done so much for me," Hamlin told reporters. "This one is for J.D. We're desperately gonna miss him for the rest of our lives, but his legacy still lives on through Joe Gibbs Racing and [I'm] proud to do this for them."
Hamlin moved in front after a final restart and had teammate Kyle Busch behind him during the final lap. Busch finished in second and fellow teammate Erik Jones ended in third. It was the first time a team had three teammates hold the top three spots in the Daytona 500 since Hendricks Motorsports achieved the feat in 1997 with Jeff Gordon, Terry Labonte and Ricky Craven.
"What happened here is emotional for all of us," Joe Gibbs said. "Denny racing like he did right there is just unbelievable. I'm emotionally shot. What happened here is really unreal, and I think J.D. had the best view of everything."
Defending Cup Series champion Joey Logano came in fourth, and last year's Daytona winner Austin Dillon came in 16th.
A huge wreck occurred with 10 laps to go after Paul Menard triggered a huge accident that impacted over 20 cars. Menard made slight contact with Matt DiBenedetto's bumper, causing him to turn and start a chain reaction that wiped out most of the race's field.