Gov. Jon S. Corzine signed legislation that approves delivering the state's 15 electoral votes to the winner of the national popular vote. The Assembly approved the bill last month and the Senate followed suit earlier this month.
Maryland - with 10 electoral votes - had been the only state to pass the compact into law.
The measure could result in the electoral votes going to a candidate opposed by voters in New Jersey, which has backed Democratic presidential candidates since 1988. However, the compact would take effect only if enough states - those with a majority of votes in the Electoral College - agreed to it.
A candidate needs 270 of 538 electoral votes to win.
The compact has also passed both houses of the Illinois Legislature, according to the National Popular Vote movement, and has been approved by one legislative house in Arkansas, Colorado and North Carolina.
The Colorado Senate approved the proposal last year, but a House committee rejected it.
Governors in California and Hawaii vetoed bills to join the compact.
The goal is to ensure that the national popular vote winner becomes president. Democrats who sponsored the bill have noted that their party's 2000 presidential nominee, Al Gore, won the popular vote that year but lost in the Electoral College.
Sponsors contend the agreement would ensure that all states are competitive in presidential elections and make all votes important. It also would guarantee the presidency to the person who received the most votes.
Corzine signed the bill privately Sunday, but spokesman Jim Gardner recently said, "New Jersey, like two-thirds of the nation's states, has long been on the sidelines of presidential races and this measure would help put the Garden State back into competition during a presidential campaign."
Republicans criticized the bill as undermining federal elections.
"This legislation is a constitutional travesty," said Assemblyman Richard Merkt, R-Morris. "It's a back door end run of the federal Constitution."