The incident took place yesterday in Gangnauli village under the Doghat police station.
Two groups attacked each other with lathis and later opened fire. Satyapal Kashyap (55) and Sunder (50) were killed in the incident, the police said.
Five others, who were injured in the violence, have been hospitalised and a case has been registered.