The court said he could not be prosecuted as the charges against him, which date back to communal riots eight years ago, had passed the legal time limit for a trial.
"The accused is released and the offence is closed," said Judge PB Kamble.
The ruling brought cries of "Victory to Thackeray" from his supporters inside and outside the court.
His lawyer, Adhik Shirodkar, described it as a "legal and moral victory."
After Mr Thackeray left the court, some of his supporters let off fireworks in celebration.
A government prosecutor said an appeal would be lodged against the decision.
Tension
Earlier, thousands of troops and police had been positioned at important junctions in the city, and some offices and schools in the suburbs were closed.
Mr Thackeray faces charges of writing inflammatory editorials during the 1992-93 Hindu-Muslim riots in Bombay in which more than 1,000 people died.
Hundreds of his supporters jostled police as they led him from his house. Some lay down in the road to prevent him from being taken away.
Tension had been high in India's financial capital since Saturday, when the Maharashtra state government said it was planning to arrest and prosecute Mr Thackeray for his role in the unrest, which erupted after Hindu extremists destroyed a mosque at Ayodhya.
Shiv Sena party workers had threatened to organise a general strike and "spill blood on the streets" if their leader were arrested.
Key figure
Mr Thackeray holds no official position, but is a powerful regional leader.
Shiv Sena provides the main opposition in Maharashtra state, and is in the federal government, closely allied to Prime Minister Vajpayee's Bharatiya Janata Party (BJP).
India's Law Minister Ram Jethmalani on Sunday resigned from the cabinet following a dispute with colleagues over the prosecution.
The government said the issue of Mr Thackeray's arrest was up to Maharashtra state and that the federal government should not be involved.
Reacting to the decision to drop charges, Mr Jethmalani, said he felt vindicated over his stand that the case against Bal Thackeray should not go ahead.