Hamlin edged Harvick by 3.068 seconds to cap the doubleheader, reversing the finishing order of the two drivers from Saturday's event at the 2.5-mile triangular racetrack in Pennsylvania. It was the first time in NASCAR history that the stock car series held two Cup Series races on the same weekend at the same track.
It marked Hamlin's fourth victory of the season and his sixth at Pocono, tying NASCAR Hall of Famer Jeff Gordon for most all-time at the track. The win also was the 41st of Hamlin's career -- 19th-most in history -- and broke a tie with Hall of Famer Mark Martin.
"Six. I can't even put it into words how much it means to me," Hamlin said. "I just tried to work through the traffic the best I could, and obviously [crew chief] Chris [Gabehart] was paying attention to the strategy there and made the right call."
Erik Jones came in third -- his best finish of the season. Chase Elliott finished fourth and Aric Almirola in fifth. Matt DiBenedetto (sixth), William Byron (seventh), Clint Bowyer (eighth), Alex Bowman (ninth) and Martin Truex Jr. (10th) rounded out the top 10.
The Cup Series' next race is set for July 5 at Indianapolis Motor Speedway.