District and Sessions judge Ramdutt Paliwal granted bail to Joshi on furnishing two bail bonds of Rs 25,000 each, his lawyer R S Raghav said.
Joshi's release on bail paves the way for him to vote in the state assembly on March 28 when the Harish Rawat government which has been asked by the governor to go for a floor test.
The legislator has also been asked by the court to cooperate with the police in the ongoing investigations into the case.
Joshi was sent to 14 days' judicial custody in the case on March 18. His bail petition had been rejected just a day later by the court of Judicial Magistrate Akram Ali.
Non bailable offences which Joshi was charged with include stopping government officials from discharging their duties.
Shaktiman stands on prosthetic limb; amputation successful
Shaktiman row: BJP MLA Ganesh Joshi sent to 14 days of judicial remand
Horse thrashing row: BJP worker arrested for assaulting 'Shaktiman'
Assault on Shaktiman: BJP MLA Ganesh Joshi's bail plea rejected
Will Uttarakhand see a repeat of Arunachal?