The victim, a native of Bulandshahr, was hit by a bullet on his thigh, they said, adding that he succumbed during treatment.
Efforts are on to trace the accused who fled after the crime, police said.
According to the police, the accused took a liking to the victim's wife and started having an affair with her.
When the victim came to know about the affair, he confronted his wife and the accused, who lived next door, they said.
The accused barged inside the house of the victim today and fired at him, police added.