In the past, a victim's family could force them to marry their rapist to avoid being shamed.
Rapists now stand to face at least 30 years in prison.
Somaliland declared itself independent from Somalia in 1991 but is not internationally recognised as a country. There is still no law against rape in Somalia.
Somaliland's speaker of parliament, Bashe Mohamed Farah, told that rape cases have risen and he hoped the new law would help stop that trend.
"Nowadays we have seen even people carrying out gang rapes," he said.
"The main emphasis of the new act is to completely stop rape."
The new law has come in after years of lobbying by children and women's rights advocates.
Faisa Ali Yusuf of the Women's Agenda Forum told they have been waiting for such legislation for a very long time.