The Frederick and Pennsylvania Line railroad ran from Frederick, Maryland to the Pennsylvania-Maryland State line, or Mason–Dixon line near Kingsdale, Pennsylvania consisting of of center-line track and of total track including sidings. Chartered in 1867, the railroad started construction in 1869 and cost $868,687.50.
It opened October 8, 1872 and was subsequently leased to the Pennsylvania Railroad (PRR) from January 1, 1875 and in July of that year, PRR formed the Frederick Division to operate the rail line. In the spring of 1896, it was liquidated in a judicial sale to the PRR for 10 percent of its 1896 book value.

Pennsylvania reorganized the railroad in December, 1896 as the Frederick and Northern Railroad Company. In March 1897, this new company was itself merged with other PRR-controlled railways, the Littlestown Railroad Company and the Hanover and York Railroad Company into the York, Hanover and Frederick Railroad, chartered under the general laws of Pennsylvania and Maryland. In 1914, this railroad and the newly built Central Railroad of Maryland were then merged into the York, Hanover and Frederick Railway Company which remained a wholly owned stock subsidiary of the PRR into the creation of the PennDel Company on December 31, 1953, and then the Penn Central Transportation Company merger in 1968 and then bankruptcy in 1970. The Frederick and Pennsylvania Line segment and other former PRR properties in Maryland were sold by Penn Central to the State of Maryland in 1982 for $9,295,000. In 2006, the State sold approximately 20 miles of the branch to the Maryland Midland Railroad for approximately $300,000.

As of 2021, all but two miles () at the southern terminus at Frederick still exist, operated by either the Walkersville Southern Railroad or the Maryland Midland Railway.

Chartering the railroad company
In January, 1866, organizers met in Frederick to discuss chartering a railroad from the District of Columbia to the Pennsylvania State line through Frederick. This required a legislative act by the Maryland General Assembly to incorporate and charter the railroad. Without it, the group could not solicit stock, purchase property through condemnation, or obtain financial backing in the form of stock subscriptions or bond sales from either the city or the County of Frederick. In March 1867 the Maryland General Assembly passed an Act to incorporate the Frederick and Pennsylvania line railroad. One of those senators voting to incorporate the railroad was its future president, Charles Edward Trail of Frederick.
The F&PL was authorized to raise $1 million ($=), in capital (at $50 per share, US$s, 1867) to construct a railroad of one or more sets of tracks (within a right of way of less than one hundred feet () in width) from Frederick, Maryland, through Frederick and Carroll counties to the Maryland and Pennsylvania line, in the direction of Littlestown, Pennsylvania. The charter also required the road to make connections with the Western Maryland Railroad but made no specific references to requiring the railroad to serve any of towns along the line such as Walkersville or Woodsboro. The charter further required the line to commence construction by March 1870 (three years from passage) and be completed within ten years or be dissolved.
(see also The full text of the corporation charter as well as General Regulation applicable to all railroads incorporated in the State of Maryland prior to 1872.)





