The incident occurred in the evening at Gazipur's Pubail area close to Dhaka where the boiler of Smart Metal and Chemical factory exploded with a loud noise.
Authorities said that of the five deceased, three were identified while the remaining bodies have burnt so badly that they could not identified immediately, DhakaTribune reported.
The two injured persons, who have suffered more than 30 per cent burns, were rushed to a nearby hospital where their condition was said to be critical.
Four fire tenders were sent to the spot.
The factory melt old tires to manufacture a special oil which is used for roads, the report quoted a local ward councillor as saying.
Gazipur Deputy Commissioner SM Alam said a three-member probe committee has been formed to investigate into the incident. Owner of the factory and other management staff are said be on the run ever since the blast took place.