This is a brief research note on the history of the railroad, not of the mechanical aspects of it (for that see the wonderful Library of Congress page), but more of a cultural viewpoint, specifically literary. References to works aren’t in any citation format, but there is enough information to track it down. I pulled this together out of general curiosity but do not intend to pursue it further, hopefully someone else will.
Searching the American Periodical Series database for the word railroad I found some interesting things. The word’s earliest uses are hyphenated rail-road. A short article in The Emporium of Arts & Sciences on Nov. 1, 1812 explains how rail-roads worked. They were originally wagons hooked together to bring coal out of the mines in Newcastle, England. Some machinery was involved but horses still pulled the wagons. The wagon wheels were on rails made of wood, sometimes metal. There were a handful of articles discussing the relative merits of rail-roads over canals for transporting goods.
The concept of mechanized railroads seems to have been first mentioned in “Rail Roads and Locomotive Steam Engines,” in American Mechanics’ Magazine (June 4, 1825) and it was conceptual not describing something in use. The idea of using such a thing in Pennsylvania was discussed in “Internal Improvement: To the Pennsylvania Society for the Promotion of Internal Improvement in the Commonwealth,” in The New Jersey and Pennsylvania Agricultural Monthly Intelligencer and Farmer’s Magazine (Jan 1, 1826), possibly reprinted from the United States Gazette. In that same year there were a couple of articles on Long’s locomotive engine. In 1827 articles discussed the proposed Baltimore and Ohio railroad (still hyphenated) but part of that discussion was on whether it should be horse drawn or pulled by mechanical engines. At this point some articles started to exclude the hyphen and just use railroad. In 1829 there was a contest in England for an engine that could pull the most weight the fastest for the least money (“Grand Mechanical Competition: Rail-Road Race for 500,” Albion, a Journal of News, Politics and Literature, Nov 21, 1829). The Jan 16, 1830 Saturday Evening Post ran a letter someone wrote to his grandmother, recalling her story of travelling from Edinburgh to London in 10 days, to tell of a steam rail trip from Liverpool to Manchester in an hour (“Railroad Travelling in 1830,”). That same year James Linnard and others wrote a resolution published in the Register of Pennsylvania to build a railroad in Philadelphia, with details on the streets it should run on and across (“Pennsylvania Rail Road, Feb 6, 1830). Several other localities followed suit and other railroads were proposed.
I limited the search to fiction and found some early essays. One of the earliest references to the railroad that I can find in a short story is “Emily; Or, the Unexpected Meeting,” in New Monthly Magazine and Humorist (Oct 1839). Even then the railroad appears to be just a manner of conveyance and not a focus of the story. Miles Ryder’s story, “A Railway Trip,” in Fraser’s Magazine for Town and County (August 1840) is an early travel story.
The MLA International Bibliography database shows that little scholarship has been done on railroads on fiction. There were a handful of articles on Theodore Drieser’s Sister Carrie, and the novels of Willa Cather. There were a few dissertations listed, but they had a specific focus (geographic identity or British novels). There was an article on the American railroad novel in the Markham Review in the 1970s. I don’t see anything specifically on short fiction. Surprisingly there are articles on train stations in fiction, and one (“Shattered Minds: Madmen on the Railways, 1860-1880” by Amy Milne-Smith in the Journal of Victorian Culture in 2016) on mental illness brought on by use of railroads.
So there is a lot of fertile ground for scholarship on the railroads in American fiction. Grant Burns published The Railroad in American Fiction: an Annotated Bibliography in 2005 that would no doubt be a big help in locating primary sources.