Mel B is suing her old lawyer for mistakenly bringing her and Stephen Belafonte's ex-nanny into their divorce case, and ultimately getting Mel sued by the lady ... according to new court docs.
The Spice Girls singer just filed suit against Susan Wiesner -- who repped Mel during the early stages of her contentious divorce against Stephen and successfully got a restraining order put in place against their nanny, Lorraine Gilles.
In the docs that were filed by Mel's new lawyer, Sean Macias, which were obtained by TMZ, Mel claims that Wiesner improperly included a third party's name -- in this case, Lorraine -- in her initial application for a restraining order against Stephen.
She's saying that's a big no-no under California law ... and that ended up getting Mel sued for defamation and invasion of privacy by Lorraine. On top of that, Mel says Wiesner's legal bills were "excessive, unconscionable, and not within the realm of reason."
She's asking a judge to award her damages and wants Wiesner to cover any damages that Lorraine might win in her lawsuit against Mel, which is still ongoing.
We reached out to Wiesner's camp ... they had no comment.