As a 23-year-old serving his first term in the Oregon state legislature, Representative Earl Blumenauer cosponsored the first bill in the country to decriminalize small amounts of marijuana.

More than 50 years later, the congressman from Portland is preparing to retire after nearly three decades on Capitol Hill, and mounting a lonely campaign to persuade his fellow Democrats, including President Biden, to press for legalization of marijuana at the federal level as a central plank of their political platforms.

“I have been doing this longer than any other politician in America, and I can say unequivocally, no politician was ever punished for being on the cutting edge of legalization of cannabis,” Mr. Blumenauer, who has become Congress’s top advocate for changing marijuana policy, said in an interview. “This is something every candidate should embrace.”

Mr. Blumenauer has urged officials close to Mr. Biden to make the issue a more prominent part of the president’s re-election message. He argues that legalization is not only good policy, but a potentially “electric” political issue that could help the 81-year-old Mr. Biden appeal to young people who polls show have drifted away from him, and whose backing could be vital to his chances of winning a second term.

“I take every chance I get to nudge my friends in the Biden administration,” he said this month at a cannabis policy forum. “The quickest way to engage young people, minority voters, to break the mold, is to come out foursquare for legalization. For compassion. For people who have been caught up in the legal morass of the failed war on drugs, and make a clean break of it.”

Legalization, in some form, is overwhelmingly popular across the country, with 88 percent of Americans saying marijuana should be legal for medical or recreational use, according to a January survey by the Pew Research Center. Twenty-four states have legalized small amounts of marijuana for adult recreational use, and 38 states have approved it for medicinal purposes.