The Salem Branch was built at different times by different companies affiliated with the
West Jersey Railroad. The oldest section was built by the
Salem Railroad, which was incorporated on March 14, 1856. Construction was completed in 1863, stretching from
Elmer to
Salem, and leased to the West Jersey Railroad on January 1, 1868. The
Swedesboro Railroad was incorporated in 1866 and built a line from Woodbury to Swedesboro, a distance of . This line opened in October 1869. In 1883, the
Woodstown and Swedesboro Railroad built a line from the end of the Swedesboro Railroad to Riddleton Junction on the Salem Railroad, east of Salem. Through the
Salem Branch Railroad (1886–1887), the West Jersey constructed an additional of main line track in the vicinity of Salem. On May 4, 1896, the
Pennsylvania Railroad (PRR) consolidated its southern New Jersey operations under the
West Jersey & Seashore Railroad (WJ&S). In 1931, New Jersey's public utility regulators ordered consolidation of PRR and
Reading Railroad (RDG) South Jersey operations. The PRR bought two-thirds of RDG's stock, and the consolidation,
Pennsylvania-Reading Seashore Lines (PRSL), became effective June 25, 1933. Passenger service on the Salem Branch ended December 30, 1950. PRSL was acquired by Conrail in 1976, including what had been known as Salem Secondary Track. Following the division of Conrail in 1999, it was designated part of
Conrail Shared Assets Operations. The southern of the line and the Glass House Spur to the
Port of Salem was sold by Conrail to
Salem County in 1985, which in 1988 leased the line to
Pioneer Railcorp subsidiary
West Jersey Rail Company in 1988 to operate. In 1995 operations of the Salem County Branch Line were assumed by SRNJ. In 2009
U.S. Rail Corporation took over operations. In 2012 the county reassigned the contract to SRNJ. In Woodbury, SRNJ maintains a yard and connection with Conrail along with a connection to the Swede Industrial Track. They also maintain a yard in Swedesboro to SMS Rail Lines and the Salem Running Track. In 2018, SRNJ leased the section of the Salem Secondary between Swedesboro and Woodbury from Conrail, with an interchange with Conrail established in Woodbury. Effective June of 2022, SMS Rail Lines has taken over the lease of the line south of Swedesboro. ==Rehabilitation and upgrades==