"Rajiv Gandhi had ordered opening of the gates of Babri Masjid while Sanjay Gandhi carried out vasectomy programme forcefully and both got punishment from Allah (God)," Khan told election rallies here.
Sanjay Gandhi died in an air crash in Delhi in 1980 while Rajiv Gandhi was assassinated near Chennai on May 21, 1991.
Taking a jibe at BJP prime ministerial nominee Narendra Modi acknowledgement of his marriage, he said "the person who could not be with his wife how can he be with the country".
Khan said division of Muslim votes will be "fatal" for the minority community.
"If your votes get divided, it will be fatal for you. This election is not just an election but a war which we have to win against fascist forces," he said.