Le'Bryan Nash scored 17 points for the Cowboys (15-7, 5-5 Big 12), who led most of the game, only to see Texas rally in the final minute of regulation to tie.
Isaiah Taylor scored 18 points for Texas (14-8, 3-6). He had the final six points in regulation.
Forte, an 85-percent free-throw shooter on the season had a big miss late in regulation, but calmly made his last shots for the win.
Texas' Connor Lammert tied it at 63 when he made one of 2 with 11.6 seconds left.
Texas had a final chance to win, but Taylor's long, running 3-pointer at the buzzer bounced off the side of the rim.
After Lammert's free throws, Oklahoma State got the ball to Forte, who had stuggled most of the second half to find an open shot against a stifling Texas defense. But the lane opened up and Forte drove, drawing a foul against Cam Ridley.
Forte, who had been dogged by chant of "air-ball" from the home crowd in the second half, went through several practice motions before making the free throws to lift the Cowboys to their first Big 12 road win of the season.
Forte finished with 14 points. Anthony Hickey added 15 points for the Cowboys.
Demarcus Holland scored 14 points for Texas, making three 3-pointers in the second half as Texas rallied and recovered from a sloppy first half that saw the Longhorns commit 13 turnovers.
The loss sends Texas further into a downward spiral. The Longhorns were ranked as high as No. 6 and were 12-2 before running in to all sorts of problems in the Big 12.
Oklahoma State: The Cowboys pestered the Longhorns into a rash of first-half turnovers but forced just five in the second. The Cowboys scored 18 off the Texas turnovers.
Texas: Texas was already without guard Javan Felix (concussion) and then lost starting forward Jonathan Holmes after he took a blow the head early in the second half. Holmes came in averaging 12.1 points but was scoreless when he left the game.
Oklahoma State: vs Kansas on Saturday.
Texas: at Kansas State on Saturday.