Kantian ethics is based upon the teachings of the philosopher, Immanuel Kant (1724–1804). According to Kant, the concept of “motive” is the most important factor in determining what is ethical. More specifically, Kant argued that a moral action is one that is performed out of a “sense of duty.”
For Kant, a moral action is not based upon feelings or pity. Nor is it is not based on the possibility of reward. Instead, a moral action is one based on a sense of “This is what I ought to do.”
To use an example, with Kantian ethics helping an old lady across the street because you feel pity for her is NOT a moral act. Likewise, helping an old lady because your coworker will think highly of you is NOT a moral act. However, helping an old lady because you have a sense of duty to help the elderly IS a moral act.
Because motive is the most important factor in Kantian ethics, it is possible for an action to have negative consequences while still being a moral act. For example, if acting out of a sense of duty you attempt to save a drowning child, but in the process you accidentally drown the child, your action is still considered a moral one.