G.E. Moore’s naturalistic fallacy is related to, but not the same as, Hume’s law. According to Moore, in Principia Ethica, you succumb to the naturalistic fallacy when you define what is good (or bad) in natural terms. That is, when you suggest that what is good is what is pleasant to people, or what makes people happy, or removes pain, etc.
While the quality of goodness and other natural qualities may describe the same thing, a cure for cancer is both life preserving and good, it is a fallacy to suggest that the quality of life preserving and the quality of goodness are the same.
According to Moore goodness is ineffable. Since it’s not a natural property, it can’t be synonymous with any natural properties. This is directly opposed to the ethical naturalism of thinkers like Sam Harris, which attempts to define morality with natural properties.