The judge ruled that the law contravened the constitution, which guarantees equality for men and women.
Edith Mmusi and her sisters have fought a five-year legal battle after their nephew said he was the rightful owner of their house.
Correspondents say traditions which stop women from inheriting property exist in many African societies.
'Respect our culture'
Judge Key Dingake said that in the name of fairness and equality women should have the right to inherit property.
"It seems to me that the time has now arisen for the justices of this court to assume the role of the judicial midwife and assist in the birth of a new world struggling to be born," AFP news agency quotes him as saying.
The BBC's Letloghile Lucas in the capital, Gaborone, says Ms Mmusi, the only one of the sisters at the High Court in Gaborone, was very excited by the ruling.
"It's a great day for us," she said.
However, her nephew Molefi Ramantele said the court had undermined the country's culture, reports the AFP news agency.
"This is a sad day for me... People should learn to respect our culture," he said.
Our correspondent says they first contested their nephew's claim in a customary court in 2007.
They lost the case and a subsequent appeal before turning to the civil courts.
The Attorney General had reportedly agreed that the customary law was discriminatory but argued Botswana was not ready to change it.
"This is a significant step forward for women's rights not only in Botswana but in the southern Africa region, where many countries are addressing similar discriminatory laws," Priti Patel of the Southern Africa Litigation Centre (SALC) said in a statement.
According to the legal rights group, the case challenged an Ngwaketse customary law rule that allows for the youngest-born son to inherit the family home.
Ms Mmusi's parents had four daughters and a son, who before he died agreed that his older half-brother could inherit the family home in the Kanye area, about 85km (50 miles) south of Gaborone.
It is the son of the half-brother who brought the case seeking to evict the sisters living at the homestead, who are reportedly all over the age of 65.
Ms Mmusi and her sisters argued that as it was their home - and they had been contributing to its upkeep and expansion - it was theirs to inherit, the SALC said.
"This is a significant step forward for women's rights not only in Botswana but in the southern Africa region” Priti Patel Southern Africa Litigation Centre