Once outside the building where he had been held, he got into a van to go to his new lawyer's office. Ghosn later left in another auto, which was mobbed by media.
According to the ruling issued by Tokyo district court, Ghosn will be released in the near future on bail of a billion of yen (nearly $9 million).
Ghosn, who was arrested on November 19 at Haneda airport in Tokyo, is accused of falsifying his remuneration for years.
Nissan CEO Hiroto Saikawa told reporters in Tokyo his company was unaffected by Ghosn's expected release on bail.
He said in a statement, "I am innocent and totally committed to vigorously defending myself in a fair trial against these meritless and unsubstantiated accusations". A date for her husband's trial has not yet been set.
The case has sparked criticism of Japan's criminal justice system and some of its practices, including keeping suspects in detention for long periods and prohibiting defence lawyers from being present during interrogations, which can last eight hours a day.
Ghosn's lead lawyer, Junichiro Hironaka, previously said the case raises questions about the fairness of Japan's legal system, repeating a statement by the International Federation for Human Rights.
Both Nissan and Mitsubishi booted Ghosn after the financial misconduct allegations came down.
Ghosn was once a prolific figure in the automotive industry, and is admired for helping save Nissan from the brink of bankruptcy in the late 1990s, which included a strategic partnership with the French automaker Renault in 1999.
The finance minister of France welcomed Ghosn's release, saying the executive would now be able to defend himself "with greater ease".
"The bail conditions are severe, but we will make sure to comply with them", Mr Hironaka said.
The bail agreement does allow Ghosn to travel inside the country but not for more than three days at a time.
At the very least, the prosecutors' appeal means Ghosn likely won't be released Tuesday, said Stephen Givens, a law professor at Sophia University in Tokyo.
Ghosn says he did not falsify financial reports because the compensation he is alleged to have under-reported was never paid or decided upon.
He is also charged with aggravated breach of trust for having transferred 1.85 billion yen in personal losses from derivatives contracts to Nissan in 2008, and having the automaker pay $14.7 million to Khaled al-Juffali, a Saudi businessman who extended credit to him.
In December Renault said it would keep Ghosn as chairman and chief executive after its preliminary investigation found no evidence of wrongdoing.
But Kyodo said Ghosn could still attend board meetings at Nissan, where he remains a director, if the court allows it.
Ghosn appeared at the court in January to seek an explanation for his continuing detention, making his first public appearance since his arrest.
Outside Nissan's headquarters near JR Yokohama Station in Kanagawa Prefecture, neighboring Tokyo, one male worker in his 50s said he wanted the case to be resolved quickly.
Ghosn said in a written statement that he is grateful for his family and friends who had stood by him "throughout this awful ordeal".