Selden was 1-for-6 shooting before scoring seven points in a row, including a tiebreaking 3-pointer with 2:17 left that put the Jayhawks (12-2, 1-0 Big 12) ahead to stay.
A jumper by Selden with 2:59 left tied the game, and he added a layup with 1:19 to go.
Jamari Traylor had 13 points for Kansas before fouling out with more than five minutes left. Brannen Greene scored 12, including two free throws with 6.3 seconds remaining.
Kenny Chery led Baylor (11-3, 0-2) with 25 points.
Kansas hasn't lost a conference opener since January 1991, when the Jayhawks were still in the Big Eight.