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.
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.