Oklahoma State's Cade Cunningham missed a potential game-winner as time expired.
Nembhard scored 21 for the Horned Frogs (6-2, 1-1 Big 12), making his last four field goals after going without even an attempt for about 14 minutes of the second half. Samuel added 18 points including a dunk that made it a one-point game with 45 seconds left.
Samuel blocked a drive by OSU's Bryce Williams with 20 seconds left, setting up Nembhard's game-winner with eight seconds remaining.
After each team took a timeout, Cunningham's final shot didn't fall.
Cunningham scored 17 points with eight rebounds to spark a second-half Oklahoma State (6-1, 0-1) comeback after the Cowboys fell behind by as many as 13 in the first half, and trailed 37-32 at the break.
Cunningham was held to just two points on 1-for-9 shooting by halftime but opened the final period with a drive to the basket on the first possession. And he didn't let up, forging a 44-44 tie after Ferron Flavors stole the ball from Nembhard and fed Cunningham, trailing on the break, for a dunk.
Rondel Walker added 12 points for OSU, Isaac Likekele and Matthew-Alexander Moncrieffe each scored 10. Five times Cunningham scored to keep Oklahoma State's lead at five points through the second half. The Cowboys opened an eight-point lead with 2:21 to go but didn't score again.
More AP college basketball: https://apnews.com/hub/college-basketball and https://twitter.com/AP--Top25
Guard Montez Mathis transfers to St. John's from Rutgers
Rutgers guard Montez Mathis has transferred to St. John's after three seasons with the Scarlet Knights.
North Carolina Tar Heels add 3-point shooting big man Brady Manek from Oklahoma Sooners
The North Carolina Tarheels have added three-point shooting big man Brady Manek as a transfer from the Oklahoma Sooners.
Central Michigan hiring Kentucky assistant Tony Barbee as men's basketball coach, sources say
Central Michigan is hiring Kentucky assistant Tony Barbee as its next men's basketball head coach, sources told ESPN.