Fire crews responded to a report of a small fire at the refinery around 2 a.m., Fire Chief Michael Banks said.
A three-quarter-inch processing line had ruptured and leaked heavy crude oil that ignited the fire, he said.
The fire was knocked down by Chevron and Richmond fire crews shortly before 3 a.m., Banks said.
The line has been shut down because oil still leaked after the fire was put out, according to Banks.
Contra Costa Health Services was notified of the fire, which did not pose a threat to the community, Chevron officials said.
No injuries were reported.
The cause of the fire is under investigation.