Exclusive

Tekashi 6ix9ine damn near had one of his former friends killed when the rapper ordered a hit ... so claims that ex-friend who is now suing the rapper.

Shane Hardy claims he had a falling out with Tekashi back in January 2018 over the rapper's gang affiliation with Nine Trey Bloods. According to docs, obtained by TMZ, Hardy says Tekashi admitted, under oath in his racketeering trial, he directed Aaron "Bat" Young and Jamel "Mel Murda" Jones to shoot Hardy.

Hardy claims on January 19, 2018 around 11:45 PM in Brooklyn, Young and Jones each fired several shots at him. Hardy claims he was hit in the back of the head and neck, but remarkably, survived.

Hardy claims he suffered serious physical injury and great humiliation. He's suing Tekashi -- along with Young and Jones -- for damages. This is Tekashi's second lawsuit in the same month. As we first reported, Fashion Nova sued the rapper for $2.25 million over his failure to promote the brand 'cause he got locked up.

BTW ... Young and Jones are currently behind bars after getting caught up in Tekashi's racketeering case. Young was sentenced to 20 years in prison after pleading guilty to being part of a racketeering conspiracy. Jones was sentenced to 11 years in prison after pleading guilty to racketeering and narcotics charges.