Officials said the fire response was raised to a four-alarm because of the heat and intensity of the blaze and the warehouse was soon evacuated.
San Francisco firefighters and Police Marine Units responded to the blaze early Saturday and also worked to protect other structures on the pier.
Officials suspect the blaze originated in the warehouse, but investigation was pending.
The warehouse was next to the dock for the SS Jeremiah O’Brien, a historic World War II ship, which was saved.
San Francisco’s interactive museum with antique arcade games, Musee Mecanique, along the pier, was also saved.
“All reports are that Musee Mecanique is is OK, there are multiple buildings on Pier 45,” the museum tweeted.
The Fisherman’s Wharf Community Benefit District said in a statement it was “very thankful” there were no injuries or casualties reported.
“The response from SFFD and SFPD was extremely quick and we are thankful that due to the rapid emergency response, the surrounding structures including the Jeremiah O’Brien, were all saved,” the statement said.