Not knowing the law is no excuse.

Literal

Law [object-を] not-know-[just-because-からといって] excuse [into-には] not-become

~からといって is a useful concessive pattern meaning 'just because X, (it doesn't follow that Y)'. Usually paired with a negative consequence. 言い訳にはならない literally 'does not become into an excuse' uses the to-become-into construction for 'to count as, to qualify as'. The overall sentence is a paraphrase of the legal maxim 'ignorantia legis non excusat'.