It is alleged that two of the men were shooters and one was an associate, police said.
A journalist and a police officer were also injured in the attack.
Prayagraj police commissioner Ramit Sharma confirmed that both Atiq and Ashraf had died and that three people had been taken into custody for the crime.
“[Atiq and Ashraf Ahmed] were brought to the hospital as per mandatory legal requirements and doctors have pronounced them dead,” he said.
“One journalist of a news agency fell and was injured while trying to run for cover, while a constable, Man Singh, suffered a gunshot wound to the hand and was being treated in hospital.”
Final words captured on camera
The killings come after the former MP’s son, Asad, as well as another man – who were wanted in connection with a murder case – were killed earlier in the week during a police “shootout”.
In the footage, just before Ahmed was shot, he is asked by a reporter if he attended his son’s funeral.
He replied: “They did not take us, so we did not go.” They were his final words.
Ahmed served as an MP in the Indian region of Uttar Pradesh from 2004-2009. He had been in jail since 2019.
He had a total of 103 criminal cases against him while his brother had 53 cases against him.