The 25-year-old accused identified as Manish lives as a tenant in the same building where the victim lives with her parents.
The incident took place on Tuesday when the victim was alone at her house. While she was being raped, a friend of the accused identified as Rajendra Sharma was watching the criminal act from the window, they said.
After the incident, the girl poured kerosene and set herself ablaze. Neighbours came to her rescue and rushed the girl to hospital, said police.
Both Manish and Rajendra have been arrested, he added.
The victim has sustained 45 per cent burn injuries and is being treated at the SMS government hospital here, said police.