Definitions of moralizing:

  • noun:   indulgence in moral pronouncements; the exposition (often superficially) of a particular moral code
    Example: "His constant moralizing drove me mad"