San Francisco's Fireboat 3 then arrived to battle the blaze from the water, and to save the historic ship - one of only two surviving Liberty ships from the WWII era and a living museum.
The fire was quickly called to four alarms, drawing 150 firefighters and 50 pieces of firefighting apparatus to the scene.
Crews on a fire-boat were able to save the ship but the warehouse is "a total loss", firefighters said. The first fire truck to respond to the scene sustained some damage.
More than 130 firefighters fought the flames, with some using ladder trucks to drench the warehouse from above. While now under control, the fire spread to the pier below the building and at one point threatened the SS Jeremiah O'Brien, the rare historic WWII ship that survived the storming of Normandy in 1944.
"Our firefighters absolutely saved the SS Jeremiah O'Brien during this fire as flames were pinching on the side of this vessel", Baxter said.
"We're happy and proud to say we protected that piece of history, especially at the beginning of Memorial Day [weekend]", Baxter said.
No injuries have been reported. The fire reportedly started around 4:30 a.m. local time.
Fire investigators were assessing any damage to the pier and were looking into the cause of the blaze, Baxter said.
"We do have concerns this is a congregation area for the homeless and we do have reports that the homeless do on occasion go into that structure to sleep", Baxter said.