Shivani poured kerosene oil on herself before setting herself alight but was saved by jail guards who immediately covered her with a blanket, the sources said.
She accused the jail superintendent of outraging her modesty, a charge that was denied by the official, they said.
She was treated at the jail hospital for minor burns on her hands, they said.
An investigation was also being made into her allegation, they said.