Kansas tied it with Markieff Morris' free throw, then Thompson and Brown scored for a 49-45 Texas lead.
Tyshawn Taylor's runner in the lane brought Kansas to 49-47 before Brown made two free throws and Joseph drilled a momentum-turning 3-pointer, giving the Longhorns a 54-47 lead at the 7:32 mark.
With a stunned crowd that hadn't seen the home team lose in almost four years growing silent, the Longhorns built the lead to 59-48 on a basket by Joseph and then, just ahead of the buzzer, another 3-pointer by the freshman guard, who had 11 points.
The Jayhawks were unable to get a good look against Texas' pressure defense for almost the entire second half. When they did, they usually missed. They committed five turnovers while missing eight of their first 10 shots in the second half as Texas slowly chipped away at a 35-23 halftime deficit.
As Texas inched closer, Hamilton dropped in two free throws, making him 6 for 6 from the line, Kansas' Mario Little turned it over and Gary Johnson moved in for another easy Texas bucket that got the Longhorns to within five at 42-37.
Marcus Morris was then called for a technical foul and Brown made one foul shot.
Earlier, a technical on Hamilton sent Reed to the foul line, where he made both shots. But Hamilton had scored and been fouled and made the free throw after Reed hit his two, leaving Kansas with a 42-33 lead.
From that point, it was all Texas, with Brown hitting two 3-pointers in a flurry that finally put Texas in the lead 45-44.
"I thought they did a great job in the first half and we did a terrible job," said Hamilton. "Then we came out in the second half and played hard."
Duke coach said that after winning his second gold medal in men's basketball would be his Team USA finale. That may not be the case anymore.
Latest from CollegeBasketballTalk
The Best Dunks of 2012-2013 (VIDEO)44 min ago
Vanderbilt hires Harvard assistant Yanni Hufnagel1 hr 33 min ago
Michigan resolves issues with Adidas2 hr 13 min ago
College basketball videos
Griner comfortable with coming out
DPS: Richard Deitsch from Sports Illustrated joins the show to discuss Brittney Griner coming out and explains why it wasn't seen as a big deal.
Three cheers for college hoops
Take a look at cheerleaders in action from around the country.