The school says the 6-foot-8 junior has been granted a medical disqualification. He'll remain with the program during the upcoming season as a student assistant coach.
Coach Dan Hurley says the staff decided it couldn't ask Diarra to attempt to play again "knowing it could severely impact him later in life."
Diarra sat out his freshman season in 2016-17 with knee problems and appeared in 31 games in 2017-18, averaging 2.7 points, 2.5 rebounds and about 10 minutes per game.
He suffered a torn meniscus in his left knee before last season and appeared in two games, playing just six minutes.
Diarra's decision leaves UConn with one open scholarship for the upcoming season.