"Though the political ideology of a Maoist does not synchronise with constitutional polity, being a Maoist is not a crime," said Justice A Mushtaq.
"Freedom becomes unlawful when it confronts with laws of the country," he added.
The police cannot detain a person "merely because he is a Maoist" unless they find that their activities are unlawful, the judge said.
The court said Mr Balakrishnan should get Rs 1 lakh as compensation.
The son of a former high court judge, Mr Balakrishnan was detained in May last year for a few hours and then released.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.