The ruling paves the way for the former Nissan chairman to be released as early as Friday, according to public broadcaster NHK.
Ghosn has been in a Japanese detention centre since his arrest on 19 November for under-reporting his compensation in the company's financial statements over a period of five years.
Prosecutors formally charged him on 10 December along with Nissan itself for submitting the official documents that under-reported the income.
But in a surprise move, the Tokyo District rejected prosecutors' bid to extend his detention.
Ghosn, who headed the Renault-Nissan-Mitsubishi alliance, has previously denied the accusations.
His arrest on 19 November unleashed a firestorm through the three-way auto alliance, which together sold more vehicles than any other group last year.
Nissan and Mitsubishi Motors promptly sacked the tycoon as chairman but Renault kept him on and appointed an interim boss as it waited to assess the legal procedures against him.
On Monday, Nissan failed to agree a replacement as chairman amid growing tensions with the French firm.
Renault owns 43 percent of Nissan but the Japanese company now makes more money, leading to rifts within the tie-up that Ghosn forged and that he was credited with holding together.
In addition to the formal charge of financial misconduct, the 64-year-old Franco-Brazilian-Lebanese executive has been accused of a variety of other unproven allegations, including using Nissan funds to purchase a string of luxury homes around the world.
Ghosn's lawyers are expected to request bail while prosecutors will lodge an appeal against Thursday's court decision, according to local media.