By TMZ Sports

"Sugar" Shane Mosley is power-dialing his travel agent right now to get on a flight to Miami ... in a last ditch effort to take down promoter Don King in court -- and save his comeback fight scheduled for August 29th at The Forum in Los Angeles.

TMZ Sports has learned Mosley got bad news from Wednesday's hearing in a Miami federal court -- where King is trying to shut down Mosley's rematch with Ricardo Mayorga.

Shane is not only the main event, he's also promoting the fight -- but King claims Mayorga is still one of his contracted fighters.

Our Mosley sources say after today's hearing ... Shane's legal team feels like King is making headway, and could succeed in stopping the fight.

We're told Shane is trying to get on a flight, and plans to testify in court on Thursday. Should be interesting -- we're told King will also be in court.