The New Haven and New London Railroad was chartered May 1848 to build a line from New Haven, the east end of the New York and New Haven Railroad, east to New London on the Thames River and the south end of the New London, Willimantic and Palmer Railroad. Construction began in 1850 and the line opened from New Haven to the Connecticut River in Old Saybrook on July 1, 1852. Later that month the rest of the line opened, from the other side of the river in Old Lyme east to New London; a train ferry took trains across the river.
The New London and Stonington Railroad was chartered May 1852 to continue east from New London to Stonington, the west end of the existing New York, Providence and Boston Railroad. On March 6, 1857 the New Haven and New London merged with the New London and Stonington to form the New Haven, New London and Stonington Railroad. The line west from Stonington opened December 30, 1858, ending at Groton, with another car ferry across the Thames River to New London. This completed the "Shore Line" route between New York City and Boston; through passenger service began December 12, 1859, with night trains first running August 19, 1861 and sleeping cars November 11.