Always, always leave on good terms.
- be tactful and professional in your explanation - avoid mentioning specific individuals or discussing negative aspects of the company or management in your explanation - focus on how the job or company no longer aligns with your career goals or values
Ultimately if you move on, just do so tactfully.