The current boundaries of the district were the subject of a Supreme Court lawsuit over partisan gerrymandering. The court ruled that taking into account partisan advantage when redistributing is "not judiciable" in Federal courts, leaving it to the states.
The Maryland 6th District was one of the original districts that had a congressman starting in 1789. At that time, the district essentially had what remains its modern boundaries, consisting of the Maryland panhandle and areas eastward, all the way to the modern western boundary of the District of Columbia. However, after the 1790 census Maryland's representation increased to 8 congresspersons. The new sixth district was in the north-east corner of the state east of Baltimore, covering essentially the modern counties of Harford, Cecil and Kent.
In 2012 the district was found to be the ninth least compact congressional district in the United States.
For most of the time from 1873 to 2013, the 6th was a mostly rural district anchored in western Maryland. It was in Republican hands for all but one term from 1943 to 1971, before conservative Democrat Goodloe Byron won it in 1971. He died in 1978 and was succeeded by his widow, Beverly, who held it for seven terms before being ousted by a more liberal challenger in the 1992 Democratic primary. Republican Roscoe Bartlett won the general election, and was reelected without serious challenge nine more times.
However, redistricting after the 2010 census significantly altered the 6th. It lost heavily Republican Carroll County, as well as the more rural and conservative portions of Frederick County, to the 8th District. It also lost its shares of Baltimore and Harford counties to the already heavily Republican 1st District. Taking their place was a heavily Democratic spur of western Montgomery County, which was only connected to the rest of the district by a tendril in Frederick County.
The new map turned the 6th from a heavily Republican district into a Democratic-leaning district. While John McCain carried the 6th with 57 percent of the vote in 2008,Barack Obama would have carried the new 6th with 56 percent. This was mainly because the Montgomery County portion had almost three times as many people as the rest of the district combined.
In his bid for an 11th term, Bartlett was defeated by Democrat John Delaney, who lives in the Montgomery County portion of the district, by over 21 points.
Proving just how Democratic this district was, in 2014, Delaney narrowly won a second term against Republican Dan Bongino. Delaney only won one county in the district. However, that one county was Montgomery, where Bongino lost by over 20,500 votes.
In 2013, Republican voters filed a federal lawsuit, alleging that the Democratic legislature and Governor Martin O'Malley had engaged in partisan gerrymandering, redrawing the 6th district after the 2010 census in a way that intentionally and unconstitutionally diluted Republican voters by including parts of the heavily Democratic Washington suburbs. A federal district judge initially dismissed the lawsuit, as did the Fourth Circuit Court of Appeals, for failure to state a claim. The Republicans appealed to the Supreme Court, which ruled unanimously in 2015 that the lower courts had improperly dismissed the case. The case went back to the lower courts where a three judge panel ruled that the Republicans could not prove that John Delaney's election in 2012 was a result of the redistricting. Republican voters again appealed to the Supreme Court, which agreed to hear the case, Benisek v. Lamone, in December 2017. In June 2019, the Supreme Court ruled that questions of partisan gerrymandering represented a nonjusticiable political question and remanded the case back to the district court with instructions to dismiss the case.
Delaney gave up the seat in 2018 to focus on his bid for president, and was succeeded by fellow Democrat and Montgomery County resident David Trone.