railroad (n.)
1757, from rail (n.1) + road. Originally "road laid with rails for heavy wagons (in mining)." The process itself (but not the word) seems to have been in use by late 17c. Application to passenger and freight trains dates from 1825, though tending to be replaced in this sense in England by railway.
railroad (v.)
"to convict quickly and perhaps unjustly," 1873, American English, from railroad (n.).
A person knowing more than might be desirable of the affairs, or perhaps the previous life of some powerful individual, high in authority, might some day ventilate his knowledge, possibly before a court of justice; but if his wisdom is railroaded to State's prison, his evidence becomes harmless. ["Wanderings of a Vagabond," New York, 1873]
Related: Railroaded; railroading. An earlier verb sense was "to have a mania for building railroads" (1847).