Yadav, along with his friend Mukul Singh, had gone to meet someone outside the Allahabad University's Tara Chand hostel when the incident took place early this morning, they said.
Yadav was BSP's candidate from Gyanpur in the last UP state elections.
"It was around 2.30 AM (early morning) when Yadav had an altercation with someone outside the hostel and he was attacked. The bullet hit his stomach," Additional Superintendent of Police (ASP) Vineet Jaiswal said.
Yadav's body was then sent for post-mortem, he said.
More From This Section
An FIR has been lodged after the victim's wife filed a complaint in which Singh has been named as an accused, the police said.
Jaiswal said a case has also been registered against other unidentified persons.
Angry BSP supporters gathered at Indian Press chowk after hearing about Yadav's death and torched a roadways bus, they said.