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
Don't be surprised to see the Ducks' junior quarterback pick up steam in the Heisman Trophy race and on NFL draft boards.
Alabama's receiving corps goes by many names: The Rugrats, The Three-Headed Monster, Super Sophomores. The talented trio has added a new dimension to the Tide.
Attorneys for the family of Jordan McNair received information about the investigation into the former Terrapins offensive lineman's death late Thursday night, just hours before a board meeting to discuss the inquiry, sources told ESPN's Heather Dinich.
Happy with how Tua Tagovailoa and Jalen Hurts have handled split quarterback duties this season, Alabama coach Nick Saban told ESPN's Chris Low on Thursday that he plans to use both players for the remainder of the season.
Baker Mayfield pulls off a trick play, where he catches a 2-point conversion, similar to a play he executed for a touchdown in the 2018 Rose Bowl.
Ryquell Armstead ran for 108 yards and a touchdown, the Temple defense scored on two of its five turnovers and the Owls beat Tulsa 31-17 on Thursday night in an American Athletic Conference opener for both teams.