It was shortly before 4 p.m. when Officers Jonathan Allen and Kelly Hendrickson of the Third Precinct responded to the East Adams Street home.
They saw James Hanovic, 67, on the rooftop and, using a nearby ladder, they climbed up to the roof, carried Hanovic away from the home and gave him oxygen until rescue workers arrived, police said.
Hanovic was taken to Southside Hospital in Bay Shore for treatment of heart and respiratory problems, police said.
Brenda Idlet, 53, of East Islip, was in the home at the time of the fire. She was taken to Southside Hospital with non-life-threatening injuries.
Suffolk County Police Arson Squad detectives were investigating the cause of the fire.