Nathalie Matthews, 38, applied for an apprehended violence order against Mr Latham after accusing him of sustained emotional and physical abuse.
But she withdrew the private application by consent before a three-day hearing was set to begin.
Mr Latham's lawyer Zali Burrows told reporters outside Sydney's Downing Centre Local Court it was a good result for her client, who was excused from attending.
"The application has been withdrawn and dismissed," she said.
Mr Latham has repeatedly denied his ex-partner's allegations and has not been charged with criminal wrongdoing.
The NSW upper house independent claimed the apprehended violence order application was withdrawn as far back as seven months ago but was finally proved right on Wednesday.
"I was due in the Sydney Local Court tomorrow for the latest instalment in the private AVO application against me," he said in October.
"But it has now been delisted and the application withdrawn … that's the end of that."
However, his dirty laundry with Ms Matthews was aired in NSW Parliament after he made allegations about her relationship with the billionaire founder of WiseTech Global, Richard White.
In turn, Ms Matthews tabled a citizen's right of reply in the upper house.
She claimed Mr Latham made a series of false and defamatory statements about her while protected by parliamentary privilege during a speech on November 12.
The MP accused Ms Matthews of being in a "pay-for-sex" relationship with Mr White and benefiting from insider trading tips, which she denied.
"This statement is false and defamatory ... Mr White never gave me insider information," Ms Matthews wrote.
A win in court is a welcome change for Mr Latham who has suffered a series of high-profile losses.
In April, he was hit with a $100,000 fine by the NSW Civil and Administrative Tribunal after it ruled an obscene tweet directed at fellow MP Alex Greenwich constituted sexual harassment.
The Federal Court previously ruled the same tweet was defamatory and ordered Mr Latham to pay $140,000 in legal costs.
The controversial politician has served as a right-wing independent MP since 2023, when a falling out with Senator Pauline Hanson led to his departure as One Nation NSW leader.
He led the populist party's return to state politics in 2019, 15 years after his failed attempt to lead Labor to federal election victory.
After losing to incumbent prime minister John Howard in 2004, Mr Latham resigned from federal parliament and was later ejected from the Labor Party.
He has been embroiled in several scandals during the past year, including taking photos of female MPs without their knowledge, for which he apologised.
1800 RESPECT (1800 737 732)
Lifeline 13 11 14
Men's Referral Service 1300 766 491