A vacation bench, comprising Justices Indira Banerjee and Ajay Rastogi, said Right to Liberty, a fundamental right, is non-negotiable as it granted bail.
However, the bench said granting bail does not mean that it approves of the journalist's tweets or posts on social media.
Kanojia, Anuj Shukla, who is the editor of Noida-based TV channel Nation Live, and its head Ishika Singh, had faced police action over the release of alleged objectionable content against the Uttar Pradesh chief minister.
The Editors Guild had on Sunday condemned the arrest of Kanojia, Singh and Shukla, describing the police action as an "authoritarian misuse of laws" and an effort to intimidate the press. An FIR was registered against Kanojia at Hazratganj police station in Lucknow on Friday night in which it was alleged that the accused made "objectionable comments against the CM and tried to malign his image".A group of journalists and activists had held a protest here on Monday over the arrests.
Kanojia had shared a video on Twitter and Facebook where a woman is seen speaking to reporters of various media organisations outside the CM's office, claiming that she had sent a marriage proposal to Yogi Adityanath.