Anderson, the leading scorer in the Big 12 Conference, hit a pair of free throws with 7:11 to play that gave the Cowboys a 60-59 lead. Oklahoma State later went on a 7-2 run that was worth a 72-65 edge with about 3 minutes to go.
Tweety Carter led Baylor (20-6, 7-5 Big 12) with 25 points while LaceDarius Dunn added 14 and Ekpe Udoh had a game-high 15 rebounds.
Keiton Page added 22 points for the Cowboys (19-7, 7-5), going 5-for-8 beyond the arc.
It was the third straight win for Oklahoma State and the first loss in four games for Baylor.
2014: The Year in Music [PHOTOS]