Railroad spokesman Gus Melonas said one track was opened about 8 p.m. Monday, and the other was cleared about 2 a.m. Tuesday.
Three cars tipped onto their sides and three others remained upright after jumping the tracks Monday afternoon, railroad spokesman Gus Melonas said.
About 10 gallons of styrene monomer oozed out of two of the derailed cars before the leaks were plugged three hours later, Vancouver Fire Department spokesman Jim Flaherty said.
No one was injured and no evacuations were ordered, but nearby streets were closed as a precaution and a 1,000-foot cordon was established around the derailment until the leaks were stopped, Flaherty said.
Travelers on passenger trains were bused around the site, Amtrak spokesman Dan Stassel said.
About 60 passenger and freight trains use the Seattle-Portland corridor daily.
The cause of the derailment was under investigation.
Styrene monomer is a flammable substance used in making polystyrene plastics, protective coatings and resins.
The derailment occurred as a freight train that originated in Everett and was bound for Barstow, Calif., pulled onto the main line from a terminal yard, Melonas said.
None of the chemical reached storm drains or other drainage into waterways, and environmental effects appeared minimal, said state Ecology Department spokeswoman Sandy Howard. A private contractor will clean up the spill, Flaherty said.