The incident occurred when four persons entered Kakhari village and opened fire on property dealer Dharmendra Paswan, injuring him and two others, SP (Rural) Brijendra Singh said.
Later, villagers caught the attackers and beat them with sticks and bricks, killing two on the spot, while the other two were injured, Singh said.
He said the injured were rushed to a hospital.
The deceased could not be identified yet, he said, adding the matter is being probed.