A moral imperative is a principle originating inside a person's mind that compels that person to act. It is a kind of categorical imperative, as defined by Immanuel Kant. Kant took the imperative to be a dictate of pure reason, in its practical aspect. Not following the moral law was seen to be self-defeating and thus contrary to reason. Later thinkers took the imperative to originate in conscience, as the divine voice speaking through the human spirit.
More at: Moral imperative