Former NBA player Cliff Alexander -- the top H.S. recruit in the country in 2014 -- was arrested Wednesday ... after cops say they found a loaded gun on him during a traffic stop.
TMZ Sports has learned ... Cliff was pulled over at around 9:30 PM CT in Chicago, Ill. after cops claim he failed to stop at a stop sign at an intersection.
Officers say when they questioned Cliff ... he admitted to having a firearm under his driver's seat -- and when officers checked, they say he did indeed have a loaded pistol in the car.
Cops say the 24-year-old told them he had the gun because he was on his way to Englewood and was nervous for his safety.
Cops also say Alexander admitted to having weed on him ... and claim they found a "clear plastic bag" with a green substance in it when they searched him.
Alexander, who cops say does NOT have a concealed carry license -- was arrested and booked on a felony charge of aggravated unlawful use of a weapon.
He was also hit with a citation for failing to stop at a stop sign -- but he was NOT booked on drug charges. Jail records show the 6-foot-9, 245-pound basketball player was released from custody late Thursday afternoon.
Alexander was a MONSTER star in high school ... earning Naismith Prep Player of the Year honors in 2014 and receiving offers to play at nearly every college in the country.
But, Cliff never quite lived up to expectations after signing with Kansas ... only logging a cup of coffee in the NBA after going undrafted in 2015.
Alexander -- a Chicago native -- is now currently a member of a pro team in France.