Simply speaking, citizens of a country elect people who will pass laws that are supposed to make life better for all. This means that in almost all cases people should obey the law. If you do not obey the law you are behaving unlawfully. But how does being ethical relate to the law.
Let’s say that a government passes a law that require people to give up people of a certain religion so they can be killed. If you know people of that religion and do not give them up, that is unlawful. But surely if you obey the law that is unethical.
Let’s take another example. It is unlawful to go through a red traffic light. But it is also unethical because there is a chance you may have an accident and hurt or kill other people.
Here’a another perspective: In the United Kingdom a law has been passed that give people the right to strike. In another article I explain why striking is basically blackmailing one’s employer. Surely most people would agree that blackmail is wrong. Indeed we have other laws which if you transgress can send you to jail. So if one strikes, one is being lawful but unethical.
What all this means is that is that being lawful ( obeying the law) is not always the same as being ethical. Also being unlawful does not always mean you are being unethical. So, unlawful and unethical are not necessarily the same. Of course, this is not an excuse to disobey any law. Careful soul-searching is necessary to make clear what ethical reasons support the decision to break the law.