Ms. Nixon had declared her support for legalization at a small fund-raiser in Manhattan in late March — pumping her fist in enthusiasm, one attendee said — but Wednesday’s announcement was the first time she detailed her position. Regulating and taxing marijuana, she said, would generate hundreds of millions of dollars in tax revenue and create jobs in the agricultural industry.

In a statement to The New York Times, Ms. Nixon also suggested that she would seek to mitigate the effects of past criminalization.

“Ending the injustice of putting New Yorkers in prison for marijuana is a start,” she said. “But we also have to correct past injustices, by expunging prior convictions — particularly for nonviolent offenders whose only convictions are for marijuana use.”

While her candidacy has attracted attention across New York and the country — Ms. Nixon, an actress, is best known for starring in the television show “Sex and the City” — polls suggest that she faces a steep climb in her challenge to Mr. Cuomo, a second-term incumbent with $30 million in campaign funds. In a Siena College poll last month, 66 percent of Democratic voters said they would support Mr. Cuomo in a primary, compared to 19 percent who chose Ms. Nixon; among African-American voters, 77 percent backed Mr. Cuomo.

Bruce Gyory, a Democratic political consultant who is not working on either campaign, said Ms. Nixon’s selection of legalization as her first policy issue and her emphasis on racial inequities in marijuana arrests reflected her recognition of Mr. Cuomo’s bulwark of support among African-American voters.

“By pushing for this, it not only helps her connect to younger minority voters but younger progressive voters. But the question is, will it be a motivator to vote?” he said. “It’s a very interesting issue choice — I’m not saying it’s crazy — but I don’t know that it will on its own do the trick.”

In 2014, when Zephyr Teachout, a little-known Fordham Law professor, challenged Mr. Cuomo for the Democratic nomination, she captured one-third of ballots in the primary — but failed to win a foothold among minority voters.