Newport Beach Fire Department officials said the fire started at about 2:30 a.m. in the 800 block of Production Place. Hazmat crews were called to the scene.
Nearby residents described waking up in the middle of the night to the sound of explosions.
Video of Costa Mesa fire with something exploding pic.twitter.com/7R1b7W73wg— Danny Sullivan (@dannysullivan) November 11, 2016
"They woke me up at about 2 a.m., and they just kept going off and going off," resident Roy Logan said. "It sounded like gunshots."
The structure, described by police as a storage yard with boats and vehicles, was destroyed in the blaze, according to fire officials. Several cars at the location were also burned.
Firefighters took a defensive approach, attacking the blaze from above and below to help prevent it from spreading to nearby homes. The fire department said calm weather conditions helped their cause.
"It was so close that we just grabbed our most valuable items and left," resident Amy McNerney said. "We were so thankful there wasn't any wind because our homes would've gone up."
Police said two people who were at the scene when the fire broke out were hospitalized. One was transported for smoke inhalation and the other for burn injuries. The extent of the victim's burn injuries were not released.
By 5 a.m., officials had declared the blaze a knockdown, but were concerned over possibly hazardous material that burned.
"That smoke is just smoldering from the junk that's still back in there. It's not really safe to put our guys in there so we're kind of waiting for some heavy equipment to show up to get in and move that stuff out of the way for us," Assistant Fire Chief Chip Duncan with the Newport Beach Fire Department explained.
Nearby residents were temporarily on standby for an emergency evacuation order, but fire officials later decided it was not needed.
As firefighters mopped up what was left of the fiery mess, officials were working to prevent any possibly contaminated water from going into storm drains that lead to the ocean.
The cause of the fire was under investigation.