Thames made a pair of 1-and-1's during the final 8 seconds, holding off a late Kansas comeback try and snapping the Jayhawks' 68-game home winning streak against non-conference opponents.
Skylar Spencer provided 13 points with nine rebounds and Josh Davis added 10 and 14 for the Aztecs (12-1), who notched one of the biggest victories in program history.
San Diego State led virtually the entire game until a Frank Mason 3-pointer with 1:26 left capped a 7-2 run that pulled Kansas to within 57-55.
A Perry Ellis free throw cut the deficit to one point with 11 seconds left, but the Jayhawks could get no closer as Thames wrapped up the win at the foul line.
Mason and Andrew Wiggins each scored 14 points and Joel Embiid added 12 with 12 rebounds for the Jayhawks (9-4).