It happened around 1 a.m. Saturday at a single-family home on 124th Street in Richmond Hill. It took firefighters nearly three hours to extinguish the flames.
The victims are being treated at Jamaica Hospital and Nassau County Medical Center for serious, but non life-threatening injuries.
The Department of Buildings was called out to the scene.
Eyewitness News has been told the building had a complaint two years ago for a faulty or illegal gas hookup.