Her campaign against a controversial security law had led to her being detained, and forced fed through a tube in her nose, for over a decade.
She was held under a law that makes attempting suicide a crime.
The court in northeastern Manipur state granted her bail on Tuesday and asked her to reappear on 23 June.
Ms Sharmila has signed a personal bail bond and is expected to be released after bail procedures are complete.
It is not clear when she will formally break her fast.
'Different agitation'