MD 5 was designated in 1927 to run from Point Lookout to the Washington, D.C. border in Suitland. The route was realigned to follow Naylor Road to the Washington, D.C. line in 1939, while MD 637 was designated along the portion of Branch Avenue leading to the border. Between 1939 and 1949, the route continued into Washington, D.C. as District of Columbia Route 5 (DC 5), which followed Naylor Road SE, Good Hope Road SE, 11th Street SE, and DC 4 (Pennsylvania Avenue) to US 1 and US 240 near the White House. MD 5 was realigned to head to the Washington, D.C. border along Branch Avenue in 1950. During the course of the 1950s and 1960s, most of MD 5 between the MD 235 intersection and the Washington, D.C. border was widened into a divided highway. In 1993, the route bypassed Leonardtown; the original alignment was designated MD 5 Business (MD 5 Bus.) before it was decommissioned in 2012. In 1997, MD 5 was realigned to bypass Waldorf to the east along what had been designated as MD 205 in 1989. The former alignment through Waldorf followed what is now MD 5 Bus. and US 301. In Prince George's County, multiple interchanges were built along MD 5 between MD 223 and the Capital Beltway in the 1990s and early 2000s. In 2007, a four-lane, divided bypass of Hughesville was completed, alleviating the traffic bottleneck within that town at the intersection of MD 231. The former alignment through Hughesville became MD 5 Bus. The portion of MD 5 between US 301 and the Capital Beltway is slated to be upgraded to a full freeway, with an interchange at MD 373 (Accokeek Road)/Brandywine Road completed and the remainder of the freeway upgrade still in the planning stages.
