Greg Hardy is learning the hard way ... don't mess (with cocaine) in Texas -- 'cause the ex-NFL star was just charged with felony drug possession and faces serious jail time.
Hardy was arrested on Sept. 25th when cops pulled over a 2010 Dodge Challenger for turning without signaling -- and during the bust, found a baggie of the white stuff in Hardy's brown Louis Vuitton wallet.
Officials say the coke weighed in at .7 grams.
Now, we've learned Hardy has been indicted on 1 count of felony possession of a controlled substance -- and faces up to 2 years in prison if convicted .