Firefighters responded to the structure on the 10500 block of Santa Gertrudes Avenue shortly after 4:30 a.m.
Officials said one car caught on fire and then it spread to other cars.
At least 21 vehicles were destroyed and another 19 were damaged by the intense heat. Firefighters said it was so hot when they arrived that it was difficult to get close.
Whittier resident Chris Lahmann said his Jeep was destroyed and everything inside is gone.
"I have finals in two weeks. All my notes from school are gone. My books are gone," said Lahmann.
The fire did not spread to the nearby apartment building, but some residents had to evacuate their homes.
"We just woke up to hear all the sirens, and it was really scary. We heard the police come and knock on the door," said resident Michelle Escobedo.
Escobedo said she grabbed the kids, computer and pictures before running out the door.
The fire was also very close to power lines and Southern California Edison crews had to come in to shut down electricity in the apartment building. There was no damage and residents were allowed to return home.
One firefighter suffered a minor injury. Officials said it could take about two weeks to clean up and get rid of the destroyed vehicles.
The cause of the fire remains under investigation.