It was the 20th career Sprint Cup win for Edwards, but first in 70 races since taking the 2011 event at Las Vegas Motor Speedway.
Johnson, coming off last week's Daytona 500 triumph, barely bested Hamlin to claim the second spot.
Hamlin settled for third after attempting to pass Johnson and Keselowski on the track apron during the final lap.
Keselowski claimed fourth while Dale Earnhardt Jr. rounded out the Top 5.
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'
Toddler uninjured after being knocked over by Obama family dog