The correct answer here is the flashback. After the soldiers sent him over the bridge to hang we enter a flashback sequence where we find out how Peyton got to the point where we first meet him. We find out that he was tricked by a disgraced Union soldier and he interfered with the railroad and the punishment for that is death by hanging.