The victims, who were all related, included three girls ranging in age from 8 to 12, a boy who was 4 or 5, and two women, said Fire Department Battalion Chief Allen Simpson. No names were released.
The cause of the fire was still under investigation.
Neighbors heard screams at about 3:20 a.m.
``I went outside to check what was going on and I just saw fire everywhere,'' neighbor Mariela Mendez told KABC-TV in Los Angeles.
Mendez, 18, said she and her parents ran to the house and found a man yelling ``Open the door! Open the door!'' at two girls scrambling to open a metal security door. The girls finally managed to open the door and escaped, Mendez said.
Simpson said the man who survived had been sleeping in the garage.
Fourteen-year-old Erica Holmes stood behind yellow police tape staring at the gutted home Monday morning.
``My two little sisters used to play down at their house,'' Holmes said.
San Bernardino is about 60 miles east of Los Angeles.