Diallo announced he was testing the waters last month but did not sign with an agent, leaving open the option to return to school. He had until midnight on Wednesday night to decide whether to keep his name in the draft.
NBA executives told ESPN he probably would have been a late first-round pick had he stayed in the draft.
"I hope to play in the NBA one day -- just not this season," Diallo said in a statement posted to Twitter. "Based on the information I received by testing the waters, I believe it's in my best interests to return to school.
"Although I was a part of the team last season and trained with my teammates, I never fulfilled another one of my dreams, which was to play for a major college program and win a national title. I am excited about returning to Kentucky for the 2017-18 season. I can't wait to play in a Kentucky jersey for the first time."
Let's Chase Championship #9 BBN!! pic.twitter.com/9Zyd9cPUom— Hamidou diallo (@Diallo1Hamidou) May 25, 2017
Diallo attended the NBA draft combine in Chicago earlier this month, posting the highest vertical leap in the class -- the second highest in draft combine history -- and also tested well in the three-quarters-court sprint and wingspan portions.
A five-star prospect in the 2017 class, Diallo graduated from high school early and enrolled at Kentucky in January. He didn't play in any games, though, and redshirted the spring semester. He will suit up as a freshman in the fall.
John Calipari is replacing all five starters from last season's Elite Eight team, with De'Aaron Fox, Malik Monk, Bam Adebayo and Isaiah Briscoe all leaving early for the NBA draft. Forward Derek Willis was a senior. Backup big man Isaac Humphries also decided to leave early to pursue professional opportunities.
The Wildcats will reload with the No. 1-ranked recruiting class, a group that includes five-star prospects Kevin Knox, P.J. Washington, Nick Richards, Jarred Vanderbilt and Quade Green, along with ESPN 100 guards Shai Gilgeous-Alexander and Jemarl Baker.