It happened in the water near a fueling pier, but they were not in the process of re-fueling when the fire started, said Battalion Chief Chuck Adams.
"It could have been much worse," Adams said.
Crews quickly knocked down the fire and towed the 30-foot cabin cruiser to Ventura Cove.
A 27-year-old-man and a 44-year-old man were on board. They jumped into the water and were rescued by lifeguards.
Both suffered 2nd or 3rd degree burns. One man fell into the engine area and was burned on 30% of his body, fire officials said. The men were rushed to the burn unit at UCSD. Their injuries were not considered to be life-threatening.
The U.S. Coast Guard assessed the water to mitigate fuel contamination.
The boat recently had maintenance work done to it, but it is unclear if that was a factor in the explosion, fire officials said. Investigators were still trying to determine who owned the boat.
The cause of the explosion is still under investigation.