Judge Louis Stanton signed the order on Monday, fewer than six months after lawyers for Madoff's friend Robert Jaffe had asked the Manhattan federal court to dismiss the four counts in the Securities and Exchange Commission's civil fraud suit.
Reuters obtained a copy of the ruling on Tuesday.
The court also dismissed claims against Cohmad, its chairman Maurice Cohn, and his wife Marcia, who was Cohmad's chief operating officer.
The claims for securities fraud are dismissed as against all defendants, Stanton wrote in his ruling, while allowing the SEC to refile the complaint within 30 days.
There is nothing fraudulent about referring customers to an investment adviser for fees, and the complaint does not allege statements or omissions by defendants that are fraudulent absent awareness or notice that Madoff's investment advisory business was a sham, Stanton wrote.
The case is SEC v. Cohmad Securities Corp et al, U.S. District Court, Southern District of New York, No. 09-5680.
(Reporting by Svea Herbst-Bayliss in Boston and Jonathan Stempel in New York)