Shurmur passed for two touchdowns and the Commodores rushed for two more, including Sherfield's 45-yard run with 48 seconds left in the third quarter.
It was the final non-conference game of the season for both teams.
"We wanted to move forward this week," Vanderbilt coach Derek Mason said. "We played extremely hard. It wasn't the prettiest thing early, but we started to move the needle a little bit."
Vanderbilt (4-5) scored 14 points in the first quarter for the third time this season. Their 14-7 lead marked the first time since the Kansas State win Sept. 16 that the Commodores held a lead after the first quarter. Vanderbilt led 21-14 at halftime, their third halftime lead of the season.
Ralph Webb rushed for 104 yards and one touchdown on 23 carries for Vanderbilt. He moved into 11th place all-time in the Southeastern Conference in career rushing with 3,885 yards.
Western Kentucky, 5-4, played without tight end Deon Yelder, the team's leading receiver in catches, yards and touchdowns, because of an injury.
The Vanderbilt defense sacked Western Kentucky quarterback Mike White five times, two on third-down plays. The Commodores finished with a season-high six sacks. The Commodores recorded four sacks in the season-opener with Middle Tennessee State.
Western Kentucky was forced to punt the ball five times.
"I thought defensively we had a pretty decent day," Western Kentucky coach Mike Sanford said. "I am at a loss for words with our inability to run the ball. The offense didn't pick it up as much as they should have. I am very disappointed in our quarterback protection."
Western Kentucky: The Hilltoppers fell short of ending their non-conference portion of the schedule with a winning record, finishing 2-2 in games outside of Conference USA.
White threw 50 passes, completing 31 for 324 yards in the loss.
Vanderbilt: The Commodores, playing at home for the first time since Oct. 7, stopped their five-game losing skid and kept their bowl hopes alive. They finished 4-0 in non-conference games and have won three straight in November dating to the 2016 season.
Shurmur's two touchdown passes give Vanderbilt 21 for the season. It is the highest total for the Commodores since the 2005 season, when they finished with 21.
Western Kentucky: The Hilltoppers will be on the road at Marshall next week for the "Moonshine Throwdown." Both teams are 4-4 in the series.
Vanderbilt: The Commodores, 0-5 in the SEC, will be looking for their first conference win at home next week when they play host to Kentucky.
More AP college football: http://collegefootball.ap.org and http://www.twitter.com/AP-Top25
Jerome Souers stepping down as Northern Arizona's coach
Northern Arizona coach Jerome Souers is stepping down as head football coach after 21 years of leading the Lumberjacks.
Higdon implies Michigan will beat Ohio State
Michigan RB Karan Higdon says he agrees with his coach that a win vs. Ohio State is guaranteed this weekend.
Tigers' offense has to rise to occasion vs. Aggies
Thinking Out Loud's Marcus Spears and Greg McElroy discuss how important the LSU-Texas A&M matchup is for both teams.
Will Georgia Tech's offense give UGA trouble?
Thinking Out Loud's Marcus Spears talks about the challenge the Yellow Jackets' triple option can present to the Bulldogs.
Houston's Ed Oliver expected to play vs. Memphis, source says
All-American defensive tackle and projected top-10 draft pick Ed Oliver, out since Oct. 20 with a bruised knee, plans to play Friday when Houston visits Memphis, a source close to Oliver told ESPN.
Can LSU get going vs. Texas A&M?
Thinking Out Loud's Marcus Spears and Greg McElroy discuss whether the Aggies can pull off an upset against the No. 7 Tigers in Week 13.