From Wiktionary, the free dictionary
nöden (“the distress (definite is often idiomatic when referring to concepts)”) + har (“has”) + ingen (“no”) + lag (“law”)
nöden har ingen lag
- necessity knows no law, desperate times call for desperate measures