The incident took place in T Nagarapalem area under Bheemili police station limits in the city.
P Hari Santosh, who worked at a sofa repair shop, used to stalk Potnuru Roopa (20), a second-year BSc student, even after she refused to speak to him, said inspector G Bala Surya Rao.
At around 12.15 pm today, Santosh went to the girl's house and set her on fire after emptying a can of kerosene on her. Rupa's brother Upendra tried to save her and suffered burns himself.
The girl died on the spot, police said.
Santosh then fled from the spot, and his mangled body was later found on railway tracks near Vizianagaram.
Upendra was taken to hospital. His condition was said to be critical.
Bheemili police have registered a case of murder and are conducting further probe.