NSW will close a loophole allowing employers to sack a woman who knew she was pregnant when hired.
Premier Gladys Berejiklian said the changes would make sure pregnant woman were not discriminated against.
"This is a great win for women in the workforce, it's a great win for families," she said on Sunday.
NSW Attorney General Mark Speakman and Minister for Women Tanya Davies announced the abolishment of two subsections in the NSW Anti-Discrimination Act 1977.
The law had allowed employers to fire women who knew, or should have known, they were pregnant when they applied for a job.
"It's unacceptable and out of step with modern standards for a woman to be overlooked for a role because she's pregnant, or dismissed from a new position once it becomes apparent she's carrying a child," Mr Speakman said.
Ms Davies said the laws were archaic and denied women equal opportunities in the workforce.
The NSW government acknowledged Greens MP Dr Mehreen Faruqi who had been a fierce advocate for changing the laws.
The move brings NSW in line with other states and territories.