The Commodores' defense also played a key role, intercepting Wildcats quarterback Jesse Ertz twice in a span of four minutes of the fourth quarter.
Shurmur, who led the country in quarterback rating going into the game, was 14-of-23 passing for 205 yards and one touchdown.
Ertz rushed for 126 yards and a touchdown, his second score on the ground this season.
Both teams had bad breaks with penalties late in the third quarter. Kansas State saw a punt return touchdown called back because of an illegal block in the back. On the previous series, a key first-down completion was called back because of an illegal hands to the face penalty.
Most of the second half was a grudge match between the defenses before Vanderbilt started to swing the momentum with an interception early in the fourth quarter by redshirt junior safety LaDarius Wiley. However, the tide quickly turned again when running back Ralph Webb coughed up the football in the red zone for Kansas State's Elijah Sullivan to recover.
Another Ertz interception put Vanderbilt back into Kansas State territory with less than 10 minutes remaining. A 32-yard pass to Trent Sherfield set up Shurmur's touchdown run three plays later.
Vanderbilt struck first with 4:06 remaining in the first quarter with a 2-yard touchdown pass from Shurmur to wide receiver C.J. Duncan. The play was set up by Webb's lower-body block on a would-be pass rusher, freeing up Shurmur to make the pass to the left side.
The Wildcats responded with a march down the field to tie the game. Ertz scored on a designed run to the left on fourth-and-inches at the Vanderbilt 15. Ertz ran five times for 62 yards on the drive.
It appeared that Kansas State had taken the lead in the second quarter after cornerback D.J. Reed scooped up a Shurmur fumble and returned it to the end zone. However, after review, the referees ruled that his knee was down prior to the fumble.
NOTES: Vanderbilt CB Bryce Lewis did not dress for the game after suffering an injury in last week's contests versus Alabama A&M. Lewis made four tackles and one interception in the first two games of the season. ... Kansas State QB Jesse Ertz's 84 rushing yards in the first half is the most he's had in one half this season. He had 88 first-half rushing yards through the first two games of the season. ... Vanderbilt LB Charles Wright was helped off the field with an apparent leg injury late in the second quarter.