Their reward is another week at No. 1 and yet another huge Big 12 South division game next weekend at No. 8 Texas Tech.
McCoy, who passed for 391 yards and two touchdowns, threw a rare interception that set up a field goal as Oklahoma State pulled within 28-24, then fumbled on the Cowboys' 10 with just over five minutes left when Texas could have put the game away.
But the defense, pushed around by Oklahoma State's punishing rushing attack and big tight end Brandon Pettigrew all day, made a huge stand. The Longhorns stopped the Cowboys on fourth down at their own 30. Texas drove the ball to the Oklahoma State 1 before turning the ball over on downs with 33 seconds left.
It still wasn't quite over. The Cowboys used four plays to get to midfield before a final desperation pass fell just short of the end zone as time expired.
The Longhorns (8-0, 4-0 Big 12) got their third straight win over a ranked opponent, and it was the toughest by far.
McCoy finished was 38 of 45 passing and ran for a touchdown. Kendall Hunter, the Big 12's leading rusher, led the Cowboys (7-1, 3-1) with 161 yards against the nation's No. 2 rush defense.