Authorities say John Cota was released from custody on Monday night. Officials have not named the prison where he served his term.
Cota was piloting the Cosco Busan ship in heavy fog on Nov. 7, 2007, when it sideswiped a bridge tower. More than 50,000 gallons of oil leaked into the bay, contaminating 26 miles of shoreline.
Cota pleaded guilty to two misdemeanor charges of illegally discharging oil in the bay and killing thousands of birds. He was sentenced in July 2009.
Prosecutors say Cota made several errors that day, including deciding to embark in the heavy fog.