The victory gave Texas a share of the conference's regular season title.
The winners, who faced a determined effort by the underdog Cowboys the entire game, led by just 51-49 after OSU guard Byron Eaton sank two free throws with 4:21 left to play. Damion James' two free throws in the closing seconds secured the victory.
James scored 13 points with a career-high 18 rebounds and Justin Mason added 10 points and seven rebounds for the Longhorns (26-5, 13-3), who will be the top seed in this week Big 12 Tournament in Kansas City, Mo.
Eaton and Terrel Harris led the Cowboys (26-5, 13-3) with 12 points apiece. Marcus Dove had nine points and 13 rebounds.
The Cowboys finished the regular season with two straight losses will play Texas Tech in the tournament's first game Thursday.
Wisconsin business offering 'therapeutic cuddling' forced to close
Ohio crash that killed two caught on camera [VIDEO]