Q: Does dina d’malchusa apply to laws of inheritance? What about civil wills that are not halachically valid?
A: Dina d’malchusa applies to laws that benefit the government or enable proper functioning of society. However, regarding laws that regulate matters between individuals and do not constitute a “common practice,” such as laws of inheritance, it is prohibited to rule according to civil law against Torah law, even if the judges are Jewish. If this were so, all monetary Torah laws would be null and void! (Responsa, Rashba 3:109; Shach 73:39; Rama 369:11; Pischei Choshen, Yerushah 1:2).
Nonetheless, often the halachic heirs agree to grant an inheritance to the remaining spouse or to divide it according to civil law. In cases where they demand their halachic share, there is a dispute whether the legal heirs can demand compensation for their signature to relinquish their legal claim (Pischei Choshen, Yerushah 1:4).
Furthermore, some authorities uphold secular wills based on mitzvah l’kayem divrei hameis, as mentioned in the inheritance series previously published (Achiezer 3:34; Igros Moshe, E.H. 1:104).