Starting quarterback Zac Robinson was unable to play because of an injury and backup Alex Cate did not complete a pass in nine attempts. Oklahoma State called on Wheeden, who completed 10-of-15 passes for 168 yards and two fourth-quarter touchdowns.
His 28-yard scoring throw to Justin Blackmon with 8:11 to play put the Cowboys in front and the Oklahoma State defense turned Colorado aside on its final two possessions.
The Cowboys have won three straight since a 41-14 loss to Texas and ran their record to 9-2. They are 6-1 in the Big 12 Conference heading into their final regular-season game against Oklahoma Nov. 28.
Colorado fell to 3-8 and 2-5.
The Buffaloes scored a touchdown in each quarter and owned a 21-10 lead early in the third.
Keith Toston ignited the Oklahoma State comeback with a 45-yard touchdown run with 3:52 left in the third period and he put the Cowboys in front by catching a 47-yard pass from Wheeden with 11:24 remaining in the game.
Brian Lockridge promptly returned the kickoff 98 yards to give Colorado the lead again but Wheeden followed by driving Oklahoma State 73 yards in seven plays -- a march that ended with his scoring throw to Blackmon.
Notable deaths of 2014 [PHOTOS]