Diddy's got a small reason to smile despite being behind bars in federal custody ... a judge just set aside the $100 million default judgment in his Michigan sexual assault lawsuit.
The embattled rapper scored the legal win during a motion hearing Wednesday ... where one of his attorneys, David Fink, convinced the judge to set aside the massive judgment because inmate Derrick Lee Cardello-Smith -- who claims Diddy drugged and sexually assaulted him at a 1997 Detroit party -- failed to prove he effectively served the lawsuit in accordance with Michigan law.
Judge Anna Marie Anzalone also scrapped the temporary restraining order stopping Diddy from selling off any assets to cover damages ... noting Diddy has a likelihood of winning the case on statute of limitations grounds because Cardello-Smith's claims date back to an alleged incident in 1997.
With the default judgment set aside, the case will now proceed like any other lawsuit. Diddy's next expected step would be to file a motion to dismiss the case entirely.
However, Cardello-Smith isn't backing down and made that clear to the judge and Diddy's attorney.
During the Wednesday's hearing, which journalist Pamela Rice-Campbell live streamed, Cardello-Smith declared, "This isn't over, Mr. Fink. Let Mr. Combs know that. This is not over!"
Another Diddy attorney, Marc Agnifilo, tells TMZ, "This man is a convicted felon and sexual predator who has been sentenced on 14 counts of sexual assault and kidnapping over the last 26 years. His resume now includes committing a fraud on the court from prison, as Mr. Combs has never heard of him let alone been served with any lawsuit. Mr. Combs looks forward to having this judgment swiftly dismissed."
As we reported ... Diddy didn't file an answer to Cardello-Smith’s lawsuit, which is why the judge originally handed the inmate the $100 million judgment he was asking for.