ignoring the common rules or laws and doing whatever one wants instead
—When my sister drives, she doesn’t care about the speed limit or road signs. She’s a law unto herself.
Paul writes that God treats all people the same, both Jews (who had received God’s Old Testament laws) and non-Jews (who didn’t have those laws):
For there is no partiality with God. For all who have sinned apart from the law will also perish apart from the law, and all who have sinned under the law will be judged by the law. For it is not those who hear the law who are righteous before God, but those who do the law will be declared righteous. For whenever the Gentiles, who do not have the law, do by nature the things required by the law, these who do not have the law are a law to themselves [law unto themselves]. They show that the work of the law is written in their hearts, as their conscience bears witness and their conflicting thoughts accuse or else defend them, on the day when God will judge the secrets of human hearts, according to my gospel through Christ Jesus. (Romans 2:11-16)
In Paul’s writing, being a law unto oneself means to do what is right even without knowingly obeying a direct command from God. In modern usage, though, the phrase means to disobey common laws as if you have your own personal set of rules that are for you only.