Joe Bergeron ran for 102 yards and a touchdown for the Longhorns (8-3, 7-1 Big 12), who end their regular season on Dec. 7 at No. 9 Baylor. If Texas wins that game and No. 7 Oklahoma State loses to No. 20 Oklahoma, the Longhorns would win their first league championship since 2009.
Texas Tech (7-5, 4-5) ended its regular season with its fifth consecutive loss under first-year coach Kliff Kingsbury.
The Red Raiders came in with the nation's top passing offense, but Texas sacked freshman quarterback Baker Mayfield seven times. Texas Tech's biggest play came on a 51-yard touchdown on a fake punt by Ryan Erxleben in the first quarter.
Mike Davis caught touchdowns of 47 and 7 yards for Texas.
Malcolm Brown also rushed for 128 yards for Texas, which pounded out 281 total yards on the ground. Anthony Fera kicked field goals of 37 and 49 yards, tying the Texas record by making 15 in a row this season.
Jackson Jeffcoat had three sacks for Texas which chased Red Raiders quarterbacks all night with a swarming pass rush. Mayfield completed 24 of 44 passes for 237 yards for the Red Raiders, who haven't won in Austin since 1997.
Any chance of a Big 12 title seemed remote when Texas began the season 1-2 and coach Mack Brown was mocked by fans for talking about winning the league crown just a few minutes after an embarrassing home loss to Mississippi.
But Texas reeled off six wins in a row and didn't stumble until a 38-13 home loss to Oklahoma State on Nov. 16. That loss rekindled speculation that Brown's job could be in jeopardy and whether Thursday night could be his last home game after 16 seasons.
Texas responded to that 25-point home loss - the worst of Brown's tenure - with a 25-point win that sets up at least the potential for a title and a Bowl Championship Series berth.
Thursday night also was the final home game for a senior class that signed with Texas just a month after the Longhorns lost to Alabama in the 2009 season championship game. That group likely expected to contend for Big 12 and national championships every year, but instead has 30-19 overall with an 18-16 mark in the Big 12. If they don't win the Big 12 title, they will be first Texas senior class since 1989 to not win or share a conference or division championship.
The Longhorns gave themselves a chance by rolling over an in-state rival playing its first game on Thanksgiving, a schedule slot that had been reserved for so long for Texas A&M.
The fake punt gave Texas Tech an early 7-0 lead before the Longhorns responded with Fera's first field goal and McCoy's long touchdown pass to Davis in the first quarter. Texas pushed the lead to 20-7 when Joe Bergeron rumbled 12 yards for a touchdown, a play set up by a 43-yard completion from Jaxon Shipley to Davis on a double-reverse pass.
McCoy's second career rushing touchdown came in the third quarter and his 7-yard TD pass to Davis in the third made it 34-10 and put the game out of reach. McCoy had three turnovers in Texas' loss to Oklahoma State, but was mistake-free against the Red Raiders and finished 10 of 19 passing for 139 yards.