Firefighters responded to the blaze at a home in the 1300 block of Vista Grande around 11:15 a.m.
Arriving crews found a deck engulfed in flames, which spread to the roof and attic, said Millbrae fire Division Chief Ron Lavezzo.
The single-alarm blaze was controlled around 2 p.m.
The San Mateo County Narcotics Task force was called to the home after firefighters discovered the marijuana inside.
"They responded, secured a search warrant and seized 370 plants and equipment associated with the growing operation," said Lt. Marc Alcantara, who heads the task force.
No one has been arrested in connection with the marijuana grow.
The fire caused an estimated $50,000 to $60,000 in damage to the home.
Lavezzo said the blaze appears to have been caused by arcing of a power line that went into the home. The arcing was due to poorly conducted illegal splicing of the power line, Lavezzo said.
Lavezzo said that aside from the entryway and garage of the home, which looked "completely normal," the house had been customized to be used for a marijuana growing operation with walls that had been opened up and drywall over the windows.
Alcantara said perpetrators of such operations often pilfer power directly from nearby Pacific Gas & Electric Co. lines, and that resulting fires are not unusual.
"They overload the electrical circuits on the house," he said.