This left only one spot remaining for five drivers, but it was the No. 2 vehicle driver who punched his ticket with some help.
The fourth driver eliminated from the playoffs was Blaney. He led for 193 of 312 laps.
Keselowski, who finished in 16th place, was the beneficiary as he advanced in the playoffs through points.
Kyle Larson and Hamlin were stage winners in the first 150 laps of the race, with Larson taking the first 75-lap stage and Hamlin the second. Keselowski finished 16th, and while Chase Elliott finished second, Keselowski's points advantage proved enough.
Kenseth will enter the final race of the year in seventh place, coming off a fifth-place finish last season.
In total, Toyotas held the top five spots at the end of Stage 2.
Also helping Hamlin's cause: He won the race off pit road and will begin the final stage as the leader.
Championship contender Jimmie Johnson's chances of an eighth Cup Series title ended with a right-front tire problem that sent him into the wall with one lap remaining in the second stage. Keselowski will start 12th.
Kenseth took his final lead of the race with a pass of Chase Elliott with nine laps remaining in his penultimate race with Joe Gibbs Racing and won the Can-Am 500 at Phoenix International Raceway. Sunday's victory could easily be the last of his career, and next weekend's season finale at Homestead-Miami Speedway could be his last altogether. A win would lock him into the championship race automatically.