Not necessarily. Morals are, by definition, more subjective than
the law.
You may have a moral obligation to do something for which there
is no legal punishment available at all. Maybe you have a moral
obligation to give your children presents as your money may permit,
but there is no legal obligation to give them more than the
necessaries, even if you are filthy rich.
In other cases you may have a moral obligation that merely
creates a separate and distinct legal obligation.
For example, you may have a moral obligation to perform services
on a contract, but you cannot be physically forced to actually
perform. The only "legal obligation" would be to pay for damages
caused by your failure to perform, if any.
Therefore, even if there is a legal obligation stemming from
such a moral obligation ("you gave your word"), they are not the
same obligation.