Judge Ronald Ellis denied prosecutor Marc Litt's attempts to imprison Mr Madoff, instead imposing stronger bail conditions and ordering the 70-year-old fund manager to complete an inventory of all the items in his home to stop him from removing any assets.
Mr Litt pressed for jail for Mr Madoff after it emerged he had posted seven packages to family and friends over Christmas containing millions of dollars of jewellery, in what Mr Litt claimed was a breach of his bail terms.
But Mr Madoff's defence team said the actions were not malicious, and were carried out in ignorance of the bail terms.
In the US, white-collar criminals are usually allowed to remain on bail unless the prosecution can prove that there is a significant "flight risk" or threat to the community.
"Because the government has failed to meet its legal burden, the motion is denied," Judge Ellis wrote in his order. "The government has failed to articulate any flaw in the current conditions of release."
The terms of Mr Madoff's bail prevent him from leaving his apartment and he also had to hand over his and his wife's passports to the court. Mr Madoff has also been fitted with an electronic tag. "The decision speaks for itself and we intend to comply with the judge's order," said Mr Madoff's lawyer, Ira Sorkin.
In a related development, Mr Litt agreed to delay seeking a grand jury indictment until February 11, when Mr Madoff will appear for a preliminary evidence-based hearing. The delay gives prosecutors more time to collect evidence and compile it in a way that will be most comprehensible, given the intricacies of the alleged fraud.
Mr Madoff is charged with one count of securities fraud and faces as much as 20 years in jail and a $5m fine if found guilty. Although he is alleged to have confessed his crimes to his sons and to an FBI agent before being arrested on December 11, Mr Madoff appears to be fighting the charge, although he has yet to enter a plea.