Gangni police OC Anwar Hossain said the shootout took place at Hariadaha field around 3am on Friday.
The dead appear to be aged between 25 and 30 but their identities are yet to be confirmed, said police.
Tipped-off on extortion taking place at a brick kiln near the field, a patrol police team rushed to the scene, said OC Anwar.
"The gunfight erupted as the criminals opened fire and police retaliated. The two of them died in the encounter," he toldbdnews24.com. "Others backed off."
A firearm, cartridges, explosives and locally made weapons were found on the spot.
Four police personnel received injuries in the incident and were taken to the Gangni Upazila Health Complex, said the OC.
The bodies have been sent to the state-run hospital in Meherpur.