 Eventually the Badayun constituency was identified for him, and he won several elections there.In the wake of the Babri Masjid demolition, Salim Sherwani left Congress to join Samajwadi Party.However, in the Indian general election in Uttar Pradesh, 2009, Samajwadi Party denied him a ticket in order to accommodate Mulayam Singh Yadav's nephew Dharmendra Yadav.