Justin Gilbert tied a school record with his fourth career kickoff return for a touchdown and the Cowboys (6-0, 3-0 Big 12) now have won two years in a row in Austin after 12 consecutive years of excruciating defeats.
"It's not easy to come down here and win and they're a much better team football team than they were last year," Oklahoma State coach Mike Gundy said.
"We never know who's going to be the guy that makes big plays for our offense. We have so many weapons that they have to continue to play unselfish and Jeremy's just kind of been there the last few weeks."
Brandon Weeden passed for 218 yards with a touchdown to Justin Blackmon for Oklahoma State.
Smith, who has run for a touchdown in 10 consecutive games for the highest-scoring offense in the country, made his latest two look easy.
The first came in the second quarter on fourth-and-inches when he ran off left tackle. There was no defender to meet him and he coasted to the end zone.
The second came in the third quarter and put the Cowboys ahead 38-24. Smith ran straight up the middle and Texas linebackers Keenan Robinson and Jordan Hicks got washed out of the play, leaving no defender within 10 yards with a chance to tackle him.
"(Those) killed us. Those are game changing plays," Texas coach Mack Brown said.
There were plenty of big plays and razzle-dazzle to go around in this one.
Gilbert's 100-yard touchdown return to start the third quarter tied Perrish Cox's Oklahoma State mark.
Then Texas' Fozzy Whittaker matched Gilbert seconds later with his second TD return in two weeks.
But the Longhorns (4-2, 2-1), still trying to rebuild after last season's 5-7 finish, never led and lost for the sixth time in their last 10 home games.
Texas freshman quarterback David Ash got his first career start and took every snap in the loss after rotating with sophomore Case McCoy the previous three weeks.
Ash was 22 of 40 passing for 139 yards with no touchdowns and two turnovers. The first was an interception that set up Oklahoma State's first touchdown and the third was a fumble with 4:34 to play that killed Texas' last chance to rally.
"We felt like he gave us a better chance to win," Mack Brown said.
Malcolm Brown ran for 135 yards and two touchdowns for the Longhorns.
Weeden, the second-leading passer in the nation who turned 28 on Friday, struggled to find his rhythm for most of the game, but clicked with Blackmon in the second quarter.
Blackmon had a 16-yard catch on fourth down to keep a drive alive, then grabbed a 15-yard TD on the next play when he caught the ball at the 3 and carried Texas cornerback Carrington Byndom into the end zone.
Smith's first touchdown put OSU up 21-10 and the Cowboys seemed primed to put the game away at the start of the third.
Gilbert took the kickoff five yards deep in the end zone, zipped through a seam near the 30 and raced past the defense for a 28-10 lead.
"It was good. I wouldn't say it was one of my most favorite returns, but it was top two or three," Gilbert said.
The Cowboys had only a few seconds to get comfortable with the lead. Whittaker, who returned a kickoff 100 yards for a touchdown the previous week against Oklahoma, matched Gilbert's TD to keep Texas in the game at 28-17.
"That was a rollercoaster," Weeden said. "We took one to the house and then they take one right back on us, so it's like you're all jacked up and then you have to get right back and ready to go out."
Texas was building momentum when Malcolm Brown scored his second touchdown to cut the lead to 28-24.
Texas ran the so-called "Statue of Liberty" play where Ash took the snap and faked a throw to his right while tucking the ball low behind his back. Brown grabbed it, scampered to his left and tiptoed on the sideline for the touchdown. The play call by first-year offensive coordinator Bryan Harsin was similar to the one used by Boise State to beat Oklahoma in the 2007 Fiesta Bowl.
Oklahoma State answered with a 22-yard field goal by Quinn Sharp before Smith ripped off his second long TD.