The Hanover Branch Company was chartered on March 16, 1847. Letters patent for the company were issued in Pennsylvania on October 18, 1849. The railroad was commonly referred to as the "Old Branch" and began construction in March 1851 and started operation in October 1852. The railroad connected at Hanover to the Gettysburg Railroad in 1858, just prior to the Civil War. The Hanover Branch was used to ship a significant volume of iron ore from local mines. In 1873 the Bachman Valley Railroad opened with a connection to the Hanover Branch at Valley Junction. The "21st Annual Report of the Hanover Branch Railroad" states that about 12,000 tons of iron ore were received from the Bachman Valley during a four-month period. This Bachman Valley route eventually became part of the Western Maryland Railroad's Hanover Subdivision from Emory Grove, Maryland, to Hanover and Gettysburg. Even after the company became part of the Western Maryland Railway, the name Old Branch remained.
The Hanover Branch Railroad is associated with historic events during the Civil War. It carried the parties of President Abraham Lincoln and Pennsylvania Governor Andrew Curtin from Hanover Junction to Gettysburg on November 18, 1863, where President Lincoln delivered the next day his Gettysburg Address at the dedication of the Gettysburg National Cemetery. The Northern Central Railway trains carried President Lincoln from Baltimore and Governor Curtin from Harrisburg, the two groups meeting at Hanover Junction and proceeding together on the Hanover Branch to Gettysburg. carried his remains, as well as 300 mourners and the casket of his son William, on the Northern Central Railway through Hanover Junction in April, 1865 After the Battle of Gettysburg in 1863, the Hanover Branch provided a route for transportation of wounded soldiers to distant hospitals and cities via Hanover Junction, since this was the only rail outlet available from Gettysburg to the outside world during the Civil War area. The Hanover Branch Railroad facilities at Hanover Junction included a hotel built by the railroad, which also housed the railroad's offices. During the Gettysburg Campaign of the Civil War, Confederate cavalry disrupted the telegraph line and destroyed the railroad's facilities at Hanover Junction, except for the hotel. On April 21, 1865, the nine-car funeral train of President Lincoln left the Baltimore & Ohio Railroad station in Washington at 8:00 a.m., arriving at Baltimore's Camden Station at 10 a.m. on the B&O. After public viewing of the President's remains in Baltimore, the train departed on the Northern Central at 3 p.m. and passed Hanover Junction at 5:55 p.m., arriving in Harrisburg at 8:20 p.m., after a brief stop at York. The next morning, the train left Harrisburg for Philadelphia at 11:00 a.m. It continued on its trip to Springfield, Illinois, for the burial, via the cities of New York, Albany, Buffalo, Cleveland, Columbus, and Indianapolis.
In the 1920s, the Western Maryland's "mixed" train came into Hanover Junction from Hanover on Mondays, Wednesdays, and Fridays at about noon time. On arrival, the engine would be at the head of the train with the engine backing. Then for the return trip to Hanover, the engine would again be at the front of the train headed for its destination. This train could carry passengers to the Junction to make connections for train No. 8021 to York at 12:32 p.m., or Train No. 500 to Baltimore at 1:28 p.m. The Hanover Junction-Valley Junction rails were removed during the period 1928-1934.