What would become part of MD 2 was originally planned as two different state roads in 1909. The portion between Solomons and Annapolis was built as a gravel road called Solomons Island Road between 1910 and 1915. The portion of road between Annapolis and Glen Burnie was built as part of the Baltimore–Annapolis Boulevard, a road authorized in 1910 to connect Baltimore and Annapolis and was completed in 1924 with the construction of a bridge over the Severn River leading to Annapolis. A state road between Glen Burnie and Baltimore was completed in 1911. MD 2 was designated in 1927 between Solomons and Baltimore, using Solomons Island Road, streets through Annapolis, the Baltimore–Annapolis Boulevard, and the state road between Glen Burnie and Baltimore. MD 2 was marked up to US 1 in Baltimore in 1939. In the 1930s, MD 2 was realigned onto the four-lane Governor Ritchie Highway between Annapolis and Baltimore; the former routing along Baltimore–Annapolis Boulevard became MD 648. Ritchie Highway became a divided highway in 1950. Between the 1930s and the 1950s, several upgrades and realignments occurred to the portion of MD 2 between Solomons and Annapolis. MD 2 was realigned to bypass Annapolis on the US 50 freeway in 1955, with MD 450 replacing the route through Annapolis. The route between Solomons and Sunderland became concurrent with MD 416 in 1960, which was renumbered to MD 4 in 1965. Between the 1960s and the 1980s, MD 2/MD 4 between Solomons and Sunderland was widened into a divided highway, with the bypassed former alignments becoming multiple sections of MD 765. The Ritchie Highway portion of the route was originally the main route between Annapolis and Baltimore until Interstate 97 (I-97) was completed in the 1990s.