Instead, he pointed to Markey’s age and seniority — he is turning 80 next July and has served in Congress since 1976 — as core concerns behind his campaign. Moulton believes Democrats risk losing voters’ trust, and elections, if they continue to back candidates who are seen as too old.

“Is he too old?” Moulton said. “Look, every political consultant will tell me not to say this, but the honest truth is, yes, Senator Markey is a very nice guy, but he’s been in Congress for 50 years, and he’ll be 86 years old at the end of his next term as our junior senator.”

“Our party needs to look ourselves in the mirror and say, ‘What are we doing wrong, and what can we do differently here?’ ” he continued. “I mean, if we can’t learn the lessons of Ruth Bader Ginsburg and Dianne Feinstein and Joe Biden, then people aren’t going to trust us to lead for the future.”

In response to the news of Moulton’s campaign, Markey campaign manager Cam Carbonnier said in a statement, “While Congressman Moulton is launching a political campaign during a government shutdown, Senator Markey is doing his job — voting against Trump’s extremist agenda and working to stop the MAGA attacks on health care so that we can reopen the government.”

“That’s what leadership looks like and what the residents of Massachusetts expect from their Senator,” Carbonnier added.

Moulton’s decision ensures that for the second time in six years, Massachusetts Democrats will be litigating a fierce and potentially costly primary battle based around Markey’s age and record. In 2020, then-representative Joe Kennedy III unsuccessfully challenged Markey by also arguing a need for generational change. That contest sparked a nasty battle that split Democrats’ loyalties in Massachusetts and Washington.

Moulton’s move will also likely set off a fierce competition among a crowded field of Democratic candidates to win the solidly blue House seat he is leaving behind.

For months, speculation had swirled in Democratic circles that Markey might draw a high-profile primary challenger. It’s possible other notable Democrats enter the race: Representative Ayanna Pressley of Boston has declined to rule out a Senate bid and has withheld her endorsement of Markey’s reelection campaign so far. (Longshot candidate Alex Rikleen, a former teacher and Markey’s first declared challenger, is also campaigning around the state.)

Markey, meanwhile, has continued to roll out endorsements — including from Senator Elizabeth Warren and most of the state’s congressional delegation — as he affirms his readiness to continue serving as senator. Speaking to the Globe in September, Markey said he is “the most energized I’ve ever been” as he focuses on countering the Trump administration.

Senator Elizabeth Warren has endorsed Senator Ed Markey’s 2026 reelection bid.Brett Phelps for The Boston Globe

Moulton’s challenge sets up a sharp test, one that will be watched nationally, of what Democratic primary voters want at an especially fraught moment for their party and the country.

Noting the Democratic Party’s consistently low approval ratings this year — particularly among its own voters — Moulton believes the clear message from the public is “we’ve got to get new leaders to step up and take us forward.”

“We can’t expect change while we’re just recycling the same old leaders,” he said. “I hear that everywhere I go. The only place I don’t hear that is from our party leadership.”

Indeed, party leadership figures to be a major foil of Moulton’s campaign. He also argued the party needs to move on from Senate minority leader Chuck Schumer of New York, who has led Senate Democrats since 2017.

Speaking to the Globe, Moulton brought up his views on Schumer unprompted. “I will vote no on Senator Schumer for majority leader, because I believe our party needs new energy,” he said.

After he broke with most Democratic senators, and all Democratic House members, to support a Republican-backed government funding bill in March, Schumer has faced a backlash from Democrats who believe he is not countering Trump strongly enough. (Moulton himself said he was “incredibly frustrated” by the move.)

Many nonincumbent Democratic candidates for Senate, including in the key states of Michigan and Maine, have pledged not to vote for Schumer, making his leadership something of a litmus test for the party base.

But Moulton’s willingness to challenge party leadership, in particular, has defined his career in politics.

In 2014, he won his House seat after challenging John Tierney, a longtime incumbent. He was a consistent, and often badly outnumbered, voice of dissent against former speaker Nancy Pelosi’s continued leadership of House Democrats. In 2019, he briefly ran for president but dropped out after just a few months. In 2024, he was the third Democratic member of Congress, and the first from Massachusetts, to say Biden should withdraw from the presidential race after his disastrous debate performance against Trump.

That impulse to challenge the party’s establishment, which has occasionally hindered Moulton’s political career, could be more of an asset with voters at this moment than in the past. At the same time, Moulton — despite his relatively progressive record overall — may still be perceived as insufficiently supportive of some progressive values based on his prior comments.

After the 2024 election, Moulton angered many in his party when he blamed Democrats’ messaging on transgender students in youth sports as a factor behind their defeats, in an interview with The New York Times. The comments sparked protests in his district and resignation of a top campaign staffer.

Asked about that controversy in light of his newly launched campaign, Moulton said his intent “was not to hurt anyone with the words I chose” and was instead to try to spark a necessary conversation within the party.

“I understand that some people were hurt by my past comments and, you know, I acknowledge that, but my intent is that we need to actually take on these issues, or else it’ll just be Republicans who do,” he said.

In his 2020 campaign, Markey positioned himself as a progressive champion and national leader on climate change as the original cosponsor of the Green New Deal policy package. Moulton, in his campaign launch video, casts himself as a fighter for many liberals’ top priorities at the moment, listing his support for “universal health care,” for instance, and fighting climate change and banning assault weapons.

“I want Massachusetts to lead the nation in big, forward-looking progressive solutions that make life better for working people,” Moulton said in the video, listing his past work on a high-speed rail plan.

Given Moulton and Markey’s alignment on those broader policies, a contest between the two could turn on other issues, just as Markey’s battle with Kennedy did in 2020. The senator’s eventual victory by a comfortable 11-point margin reinforced the notion that the veteran lawmaker is far from an easy target.

“A lot of people look at the experience last time and say, you know, understandably, he’s going to be hard to beat, and I respect that,” Moulton said. But this time, he said, the party’s desire for change and “new leadership” is a strong sentiment.

Ultimately, Moulton is comfortable taking risks. When he ran against Tierney in 2014, he recalled, his first poll showed him down 53 points.

“I don’t mind being an underdog,” he said.

Sam Brodey can be reached at sam.brodey@globe.com. Follow him @sambrodey.