Immanuel Kant’s theory of ethics is considered deontological for several different reasons.  First, Kant argues that to act in the morally right way, people must act from duty (deon).  Second, Kant argued that it was not the consequences of actions that make them right or wrong but the motives of the person who carries out the action. Kant’s argument that to act in the morally right way one must act purely from duty begins with an argument that the highest good must be both good in itself and good without qualification.
Something is “good in itself” when it is intrinsically good, and “good without qualification”, when the addition of that thing never makes a situation ethically worse. Kant then argues that those things that are usually thought to be good, such as intelligence, perseverance and pleasure, fail to be either intrinsically good or good without qualification. Pleasure, for example, appears not to be good without qualification, because when people take pleasure in watching someone suffering, this seems to make the situation ethically worse.
He concludes that there is only one thing that is truly good: Nothing in the world—indeed nothing even beyond the world—can possibly be conceived which could be called good without qualification except a good will.  Kant then argues that the consequences of an act of willing cannot be used to determine that the person has a good will; good consequences could arise by accident from an action that was motivated by a desire to cause harm to an innocent person, and bad consequences could arise from an action that was well-motivated.
Instead, he claims, a person has a good will when he ‘acts out of respect for the moral law’.  People ‘act out of respect for the moral law’ when they act in some way because they have a duty to do so. So, the only thing that is truly good in itself is a good will, and a good will is only good when the willer chooses to do something because it is that person’s duty, i. e. out of “respect” for the law.
He defines respect as “the concept of a worth which thwarts my self-love. “ Kant’s two significant formulations of the categorical imperative are: Act only according to that maxim by which you can also will that it would become a universal law. Act in such a way that you always treat humanity, whether in your own person or in the person of any other, never simply as a means, but always at the same time as an end.