The bill was passed Tuesday, despite opposition from southern lawmakers who walked out of the parliamentary session in protest.
The Sudan Peoples' Liberation Movement (SPLM) and other southern parties object to a clause that will allow southerners living in northern Sudan to cast absentee ballots.
A top SPLM official, Yasir Arman, called the bill's passage the worst violation yet of the 2005 peace deal that ended Sudan's north-south civil war.
The referendum, scheduled for 2011, is a key part of that deal.
According to the law adopted Tuesday, southern Sudan will split from the north if a majority of voters choose independence. Sixty percent of the electorate must cast ballots for the vote to be legitimate.
The north and south's ruling parties also have squabbled over the terms of national elections set for next April.
On Monday, the north's ruling National Congress Party accused southern officials of inflating voter registration rolls.
Sudan's electoral commission said some southern states registered more than 100 percent of their estimated eligible voters.
Southern officials say the earlier estimates were too low because Sudan's national census undercounted the states' populations.
Analysts have warned that Sudan risks sliding back into civil war unless those northern and southern disputes can be resolved.