Yadav surrendered before the Chief Judicial Magistrate court, which granted him bail.
The case pertains to violation of model code of conduct during the 2007 elections in UP. Yadav, who was contesting from Mughalsarai assembly seat had allegedly took out a procession in violation to the norms.
The court had issued non-bailable warrant against Yadav on July 3, his counsel Anil Singh said.