Markey, who has served in Congress since 1976, defeated Republican Gabriel Gomez, a former Navy SEAL turned investment banker, 55 percent to 45 percent, with 97 percent of precincts reporting, The Boston Globe reported.
Turnout was low in the special election to replace Kerry, President Barack Obama's second secretary of state.
"It's kind of an underwhelming election," William F. Galvin, the Massachusetts secretary of state, earlier told The New York Times.
Both candidates failed to talk much about the issues polls suggest are most important to voters.
Markey, seeking to fire up the state's liberal base, ran on banning assault weapons and protecting abortion rights despite voters telling pollsters job creation and the economy are more important to them. The most contentious the race became was Gomez's anger at what he said was Markey's politicizing a shooting at an elementary school in neighboring Newtown, Conn.
"Those [criticisms] didn't resonate, and he doubled down on them," said Peter Ubertaccio, a political scientist at Stonehill College in Easton, Mass. Gomez repeated an intemperate remark that Markey was "pond scum" for using the shooting in a political context.
"He doesn't yet have the instincts of a good political candidate," Ubertaccio said.
For his part, Markey's cautious campaign might make good sense now but will only serve to make him appear weaker in 2014, when a full term will be at stake that could attract more attention.
"Markey ran a cautious campaign that was a reflection of his personality," Ubertaccio said.
Among those potential challengers is Scott Brown, the Republican former senator, who has gone on record saying he thinks he could beat Markey and could run against him a year from now should he prove victorious Tuesday.
Swim Week Miami Beach 2014 [PHOTOS]