The discovery was reported at 9:39 a.m. just north of the South San Francisco Caltrain station.
A dispatcher initially said it appeared a pedestrian had been hit by a Caltrain, but Caltrain spokeswoman Christine Dunn said the body was found between two stationary freight cars.
Police are investigating the death, and the area was still cordoned off as of 10:30 a.m., Dunn said.
Caltrain service was briefly affected but has since returned to normal.