Northport became the terminus of an extension of the Hicksville to Syosset Railroad line, after some arguments with Oliver Charlick over the locations of stations in Cold Spring Harbor, and Huntington led to the line bypassing both towns, the latter of them two miles to the south, though a station was built for both of them. The line was extended from Syosset past Huntington to Northport in 1868, and in 1873 the Smithtown and Port Jefferson Railroad opened from a mile south of Northport to Port Jefferson, turning the old line into Northport into the Northport Branch, the result of another argument between Charlick and Northport.
Old Northport Station was abandoned in 1899, but the Northport Branch was used as a freight line throughout much of the 20th Century. Between the 1950's and early-1980's, the New York State Department of Transportation wanted to use part of the branch for construction of the Babylon-Northport Expressway. Opponents of the expressway assumed that the NYSDOT was using the expressway as a plot against the railroad. In reality, the industries that previously used the line no longer found it useful, and it was abandoned in 1978, and dismantled in 1985.
In 2007, a 4.4-acre (18,000 m2) segment of the former right-of-way was preserved as the Laurel Hill Rail Trail. The size of the rail trail was doubled in 2009 with the addition of 4 acres (16,000 m2) of parkland from an adjacent undeveloped parcel that had been acquired by New York State by eminent domain for the Babylon-Northport Expressway.