The bill, to be introduced to Parliament today, will restrict content published by the Yes and No campaigns and will apply until mid-November.
It includes measures to prevent vilification, intimidation, or threats to cause harm on the basis of the sexual orientation, gender identity, intersex status or the religious convictions of someone during the survey period.
Anyone found to have breached those provisions could be hit with a $12,000 fine and a court injunction.
Acting Special Minister of State Mathias Cormann has been negotiating with Labor on specific safeguards ahead of the optional ballot.
Senator Cormann said Parliament needed to implement the measures because the survey was being conducted by the Australian Bureau of Statistics and the "usual safeguards" under electoral laws did not apply.
"We want this process to be fair and for Australians to get the opportunity to have their say in an appropriate environment," Senator Cormann said in a statement.
Labor will support the bill, but Shadow Attorney-General Mark Dreyfus said it "does not in any way legitimise this survey process, which has been foisted upon Australians at a massive cost".
The legislation cites the Electoral Commission as one of the bodies to monitor whether someone has breached the Act.
The Government wants the safeguards to pass Parliament this week, as close to 600,000 survey forms have already been mailed to homes across Australia.
On Monday, Liberal senator James Paterson questioned why the same-sex marriage survey requires stronger restrictions than general election campaigns.
"I think we should be very careful about going further than we do for normal elections, so whatever standards we apply to normal elections should apply to this," he said.
Nationals senator Matt Canavan stirred controversy on Monday by saying the campaign had not been that bad, and those offended by the debate should "grow a spine".