Steve Francis and his estranged wife are hammering out a divorce settlement ... even though she's calling him out with allegations of drug abuse.
In divorce docs, obtained by TMZ Sports, Shelby Francis claimed Steve has "severe substance issues" ... and asked a judge to order him to undergo random drug and alcohol testing. She also claims Steve's been to rehab "prior to and during the divorce" ... which was filed in June 2015.
The ex-NBA great has dealt with rampant speculation about possible drug use -- and, in fact, vehemently denied there was an issue when he talked to us last year.
Shelby's lawyer, Chad Pinkerton, tells us the exes reached an agreement through mediation last week. He says final docs haven't been filed, but they're close.
We reached out to Steve's camp, but haven't heard back.