Sgt. Scott Nicholls, 38, and Police Officer Mark DiPilato, 35, were on routine patrol in the New Brighton section at about 9:15 a.m. when they saw smoke coming from a three-story building on Jersey Street.
The two cops called in the fire and then rushed upstairs to the third-floor apartment.
They roused the three teens and the three adults in the apartment - all of whom were still asleep - and ushered them outside to safety. The children included two 13-year-old boys and a 14-year-old girl, officials said.
The cops said that for a few frightening seconds, they lost contact with each other.
Firefighters arrived soon after the cops emerged from the apartment and had the blaze under control by 9:42 a.m.
The people in the apartment were not injured, but Nicholls and DiPilato were treated at St. Vincent's Hospital Staten Island for smoke inhalation and later released.