New Jersey Gov. Phil Murphy was working the phones over the weekend, hoping to drum up enough support ahead of the state legislature’s scheduled vote to legalize marijuana Monday.

As of Friday afternoon, the Democratic-controlled state Senate was a few votes shy of approving the bill. The state Assembly, also controlled by Democrats, lacked the necessary votes, but that was in part because some lawmakers were reluctant to support a measure that could fail in the Senate, people familiar with the matter said.

“We’ve made some good progress,” Mr. Murphy said at a news conference Friday. “I’m an optimist in life, but we aren’t there yet in either chamber.”

Under the legislation, the state would collect an excise tax of $42 for every ounce of cannabis sold by weight, and cities and towns would receive tax revenue for hosting cultivators, wholesalers and retailers. It would also allow for the dismissal of all convictions and pending charges for possessing or selling up to 5 pounds of the drug.

Mr. Murphy, a Democrat, campaigned on marijuana legalization and says it will make up for the discriminatory enforcement of drug laws that have disproportionately affected black and Hispanic communities. A Murphy administration official said Friday the governor would reach out to lawmakers in both parties throughout the weekend.