There is no denying the impact of morality on law. Although the law is created to prevent an anarchical society, as Hobbes suggests, it more importantly serves a moral purpose. Or at least it provides guidelines for acting in a moral way. And if law is supposed to be morally grounded, then it ought to be our moral obligation to obey the law. A problem arises, however, in whether the laws that are enforced are actually morally grounded. In my opinion, as long as the law is not serving some sort of moral injustice, then it should be followed. But if the law is morally unjust, then the method by which one would disobey the law must be moral.
How can a government create laws that are morally unjust? The answer lies behind the notion that everybody has a different concept of morality. Taking a cultural relativist approach, consider the case of polygamy. In many African, Asian, and other Indigenous societies, it is acceptable and often encouraged for a single man to have many wives. In the United States, on the other hand, it is illegal based on the fact that it is immoral. Polygamous societies, however, may see the practice as being morally right. A man has the opportunity to provide for many wives, who might otherwise be impoverished without his support. Furthermore, a single man is able to increase the people’s chances of survival by maximizing opportunities of reproduction. The point to take away from this example is that because we all perceive morality differently, it is possible for a government to implement laws that may appear to be immoral. It is thus important to consider the reasons behind why you follow a law, rather than blindly subjecting yourself to them.
When disobeying a law that is perceived to be immoral, one should make sure to not react in an immoral way. For example, during the U.S. Civil Rights Movement, African Americans protested the government’s promotion of inequality based on race. Although there were likely physical acts of rebellion, the most effective ones were pacifist movements. Martin Luther King Jr. was able to promote change through his speeches, and through the Montgomery Bus Boycott movement, mass groups of African Americans were able to defy the law in a civil manner. Had they responded to the government with extreme acts of violence, they may have caused innocent deaths. And if this were the case, they would have been responding to an immoral act by using immoral tactics—contradicting their cause. Essentially, you can’t fight fire with fire. And you cannot fight for your cause by using methods that contradict your motives. Not only will it be ineffective, but also it is hypocritically immoral. You can, however, fight immorality with morality.
So yes, we are morally obligated to follow the law, but only moral ones. And since it is possible for a law to be immoral, those laws could and should be disobeyed. Though, if a law is to be disobeyed, it should be done in a moral manner. The goal should be to maximize morality, which cannot be achieved through immoral standards.