The court also slapped a fine of Rs 2,000 on Mitrasen Yadav, an MLA of Bikapur constituency in Faizabad.
However, the legislator was later released on bail.
The case was related to 1991 General Elections when Yadav was contesting as a Communist Party of India candidate against BJP's Vinay Katiyar.
The case was filed against him in Kumarganj police station area of Faizabad on 15 June 1991.
A presiding officer of a polling station had lodged complaint against Yadav.
Yadav, a senior political figure, had started his political carrier from Communist Party of India, and has served five terms as MLA and 3 terms as MP from Faizabad.