Rajesh Yadav, who had contested this year's assembly elections, was shot at about 2.30 am outside the Allahabad University's Tarachand Hostel, where he had gone to meet someone along with a friend. They reportedly had an argument with a group of people, who threw stones at their car and then shot the politician in his stomach.
Mr Yadav had died by the time his friend drove him to a private hospital nearby. His attackers escaped, said the police, who have found two empty cartridges inside the BSP leader's SUV.
This morning, a mob of about 50 attacked the hospital, ransacking it and also allegedly attacked journalists there, snatching and breaking their cameras and mobile phones.
They also set fire to buses near the city's India Press roundabout. The violent protests were centred around the Georgetown and Colonelganj areas of Allahabad, close to where Mr Yadav was murdered, the police said.
Rajesh Yadav had fought the 2017 assembly polls on a BSP ticket from a seat from the neighbouring Bhadohi district. He came third after the winner Vijay Mishra, a Samajwadi Party rebel, and the BJP's Mahendra Kumar Bind.
Mr Yadav lived with his family at the Haritkunj Apartments near Chandrashekhar Azad Park, not far from where he was shot.