The Jayhawks (6-1) built an early 14-point lead only to see Oregon State tie the score at 37-all. Then, after Kansas pulled away for a 63-50 advantage early in the second half, Ahmad Starks led a 9-1 run to cut the deficit to 64-61.
Starks, who had 25 points, made a long 3-pointer at the 1:26 mark that shaved Kansas' lead to 78-73. Then with 56 seconds to go, Releford made two free throws and Jeff Withey rebounded after Starks missed from 3-point range.
Roberto Nelson sank two free throws for Oregon State (4-2) and Starks fed Devon Collier inside for a dunk that gave the Jayhawks an 80-77 lead. With 13.9 seconds left, McLemore calmly sank two free throws and with 8.5 ticks remaining, Kevin Young batted an Oregon State shot into the seats.
Withey, who had a triple-double in Kansas' previous game, had 17 points, five rebounds and three blocks for the Jayhawks, who were meeting Oregon State for the first time in the long basketball history of the two schools, who rank No. 2 and No. 20 on the Division I all-time victory list.
Nelson had 17 points for Oregon State while Eric Moreland had five points and 16 rebounds.
Ben McLemore was 6 for 8 in the first half as the Jayhawks hit 12 of their first 15 shots and seized what the partisan Kansas crowd probably felt was a
Olaf Schaftenaar also had a 3-point bucket in the spree as the Beavers fought to beat a ranked team on the road for the first time since 1985.
The Jayhawks made nine of their first 11 shots in the second half and led 63-50 on Releford's fastbreak layup. But Starks' 3-pointer ended the 9-1 run for the Beavers.
Kansas settled for a 42-39 halftime lead when Young made a free throw, Releford hit a jumper and Young followed with a big dunk.
The Beavers were playing their second game since a knee injury ended the season for Angus Brandt, their top inside presence who was averaging 11.3 points and 8.5 rebounds. Oregon State hopes to get a medical hardship for the 6-10 senior.