Kershaw (14-9) gave up just three hits in bringing the Dodgers' once-promising season to a winning conclusion.
Los Angeles was 17 games above .500 in mid-June, but finished only 10 games over the break-even mark and wound up eight games behind San Francisco in the race for the National League West title.
Kershaw posted a 2.53 earned run average this year, best in the majors, and his 229 strikeouts were second best to R.A. Dickey of the New York Mets.
Los Angeles was clinging to a 2-1 lead heading into the eighth, but Alex Castellanos hit a solo shot in that inning and Juan Rivera had a two-run blast. The homer by Castellanos was his first in the majors.
The loss went to reliever Clay Hensley (4-5), who surrendered the go-ahead run in the sixth inning.
San Francisco, World Series champion two years ago, will face Cincinnati in the best-of-five division playoff round.
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'
Exploding whale video goes viral on Internet