The fire department received a report of a man hit by a train near Jackson Street at 7:47 a.m., fire spokesman LaShon Earnest said.
When firefighters arrived, they found the man and his dog deceased, he said.
It is believed that the man was walking the dog and pushing a bicycle across the tracks when a southbound Amtrak train hit them, Earnest said.
The train has stopped, and Hayward police remain at the scene.