Legal philosophers tend to assume that we have a moral obligation to follow the law. In the case of the natural law theorist, this assumption is well-founded and fits perfectly into their definition of law. (Natural law theorists define law by what it morally should be, so that in order for something to be considered law it must meet strict moral standards. This means that they would not consider something like Nazi law to actually be law.)
It seems reasonable to say that there is a moral obligation to follow the law when your definition of “the law” is only that which is morally right—if there is no difference between what law is and what law should be, then it would be clear to me that you should follow the law, because morally it would be the right thing to do.
However, natural law theorists are not the only ones who make this assumption. Legal positivists also seem to accept the idea that we have a moral obligation to the law without even questioning it. For instance, Hart believes that people use natural law as an excuse, so that they don’t have to feel guilty for breaking laws that don’t meet their moral standards. This assumes a moral obligation to follow the law (or at least that people feel this moral obligation).
Legal positivism does not define law by what it should be; rather, law is simply a human construct and can include a number of morally ambiguous or even morally repugnant laws; for example, most legal positivists (including Hart) consider Nazi law to still be law—bad law, but still law. In light of this, it seems a tenuous claim that we are morally obligated to follow the law (using the positivist definition).
As an example, imagine that you are living in Germany during World War II. Let us also imagine that you have a Jewish neighbor, and in a moment of great bravery you decide to allow him to hide in your house instead of turning him in. Now, by doing this you have definitely broken the law. Consider your feelings in this situation—scared, yes; uneasy, certainly—but are you feeling guilty? Do you feel as if by breaking the law you have done a great wrong (or even a wrong at all)?
In this situation, you have broken the law, but most people would not believe we have a moral obligation to aid in the murder of innocents regardless of whether or not the law requires it. A moral obligation to follow the law under the legal positivist definition seems counterintuitive to me, as it is undermined by a number of very possible situations and places a moral value on something that isn’t always moral (the law).