EXCLUSIVE

Bethenny Frankel got screwed in her divorce -- once by her ex-husband and once by her own lawyers -- so she claims in a new lawsuit.

According to the lawsuit, back in 2011, Bethenny bought a Manhattan condo for $5 million. Jason Hoppy, her hubby at the time, suggested she put the property in a trust. She claims she wanted it held in her name alone, but went along with the trust idea and they had their lawyers draft the document.

Bethenny claims, after divorce papers were filed -- to her horror -- she discovered the trust gave Jason a 50% interest in the condo. What's more, he had the right to live there and not pay a penny in rent.

Bethenny claims the snafu made the divorce super messy and it took 3 years to resolve.