Ayanna Pressley, now serving on the Boston City Council, beat the 10-term Democrat in another big Democratic upset.
"It seems like change is on the way", Pressley said to cheers during her speech.
She'll face Geoff Diehl, a state representative who served as co-chairman of President Donald Trump's 2016 campaign in the state and defeated two other Republicans for his party's nomination.
"Ayanna Pressley is going to be a good congresswoman", Capuano said in brief remarks to supporters.
Pressley's victory - as a younger woman of color - echoes the upset win, earlier this year in New York City, of political newcomer Alexandria Ocasio-Cortez, who also ousted a longtime congressional incumbent.
The race between Capuano and Pressley was perhaps the most closely watched contest in MA, especially since Pressley drew comparisons to Ocasio-Cortez.
Capuano conceded defeat to Pressley in the race to represent Massachusetts' 7th District approximately 90 minutes after the polls closed.
The district she's competing in includes a wide swath of Boston and about half of Cambridge as well as portions of neighboring Chelsea, Everett, Randolph, Somerville and Milton.
Pressley has bristled at the notion that race was a defining issue in her campaign. "I voted for Pressley because she has and will challenge polices", she said. Pressley called for an "equity agenda" centering around public health, reducing violence, transportation, housing, and advocacy for women.
As in Ocasio-Cortez's race, Pressley was a progressive woman of color challenging a white male lawmaker.
Both contended that Baker's support among voters was soft and that his administration had failed to make significant strides in many areas, particularly the problems plaguing the Boston-area transit system known as the 'T'.
She was raised by her single mother, Sandra Pressley, on the north side of Chicago while her father, Martin Pressley, battled addiction and spent much of her childhood in prison. Pressley acknowledged that she and Capuano would probably vote the same way on most issues, but she has argued that she could lead "a movement" from the seat.