The incident took place as security was stepped up ahead of Pope Francis' visit to the country from November 30 to December 2.
A fire broke out at the tin-and-bamboo structure after a firefight and explosions, said Mahabub Alam, Rapid Action Battalion-5 Commanding Officer.
The bodies of the three suspected militants were found by a bomb disposal unit among the debris after the fire died out, the official said.
Two pistols, three grenades, eight detonators and various bomb-making materials were recovered from inside the location, said RAB Media Wing Director Commander Mufti Mahmud Khan.
More From This Section
"We have wrapped up the operation...three bodies were found at the scene," Mahmud said.
He said the three militants blew themselves up that also resulted in burning down of their den, a hay-made hut, defying calls for surrender this morning.
Officials said the Islamists rented the house at a remote shoal of the Padma river along the Indian border 15 days ago and identified them as migratory bird watchers.
Officials and witnesses said the scene was handed over to police's Criminal Investigation Department (CID) for collecting evidence for subsequent legal actions.
RAB officials said they located the militant hideout based on information provided by militants captured earlier.