Kant says that what makes an action good is that it is the result of a good will, or good motivations and intentions. According to him, only the good will is always good. All other good things have the potential to be misused or perverted. For example, being smart can be good if someone uses intelligence to perform good actions. Being smart can also be bad if someone uses his or her intelligence to hurt people. Other kinds of goods that can be perverted are gifts of nature, such as talents of mind (being smart, being funny) and qualities of temperament (courage and resolution) as well as gifts of fortune (power, riches, honor, health and happiness).
Unlike Mill, Kant does not think that happiness is always good. Kant says that happiness is only good if the person who is happy also has a good will. First, he thinks that sometimes happiness makes people arrogant. Being arrogant can make someone insensitive or greedy. Also, when people are happy then they tend to think that they deserve to be happy. Kant thinks that this is problematic because some people don't deserve to be happy if they have not earned their happiness (e.g. lazy people or people who are just really lucky).
Kant thinks that even if the consequences of your action are terrible, an action is moral if you have the right motivations. If someone acts out of his or her good will and has good intentions, then an action is good.
The good will has three features. First, the good will is necessary in order for other things to be good. Second, the good will is the only thing that is always good. Third, the value of the good will is much higher than the value of all the other goods combined.
Conforming with Duty vs. Acting from Duty. It is important to note that Kant does not think that it is enough if our actions just happen to conform (or fit in with) a duty. Rather, one must act from the duty. In other words, one must act because one wants to fulfill his or her duty. For example, your mechanic has a duty to not overcharge you when you bring in your car to get fixed because it's unfair. Now imagine two different mechanics. The first mechanic, Charlie Good, never overcharges his clients because he knows that it is wrong to overcharge people. Charlie acts from duty because he wants to fulfill his duty. The second mechanic, Susy Selfish, would love to overcharge some people, but she knows that if she does so, it will hurt her business. Susy does not act from duty. Susy acts selfishly, so her action merely conforms with duty.
Another example. Doctors have a duty to be honest with their patients out of respect. Now imagine Dr. Duty. Dr Duty always tells his patients the truth because he thinks it is important to respect his patients by being honest. Dr. Duty acts from duty. Now imagine Dr. Meme. Dr. Meme tells his patients the truth but only because he knows that he will lose his medical license if he lies. Dr. Meme conforms with duty but he does not act from duty.
Yet more examples. Another example of someone who does not act from duty is the Happy Helper. The Happy Helper helps others not because he thinks it is the right thing to do. Rather, the Happy Helper only helps others because it makes him feel good about himself. Kant says that the Happy Helper's actions are not morally good or morally worthy. One more example is the honor-obsessed Klingon. A Klingon may perform a "good" action, such as saving the life of her crewmates. This action, however, is not good if she only does so in order to gain honor. Because the Klingon does not act from the good will, her action is not good.
Three Claims about The Good Will and Duty. First, an action has moral worth only if the action is done from duty. Second, acting from duty means respecting the moral law. Third, an action is good not because of the consequences of the action but it is only good because of the maxim (rule or principle) that is being followed when the person acts.
Maxims. An action is good if it follows a good maxim. A maxim is a personal rule or personal principle that guides action. For example, "Never lie to friends and family" may be a personal rule that I follow. This maxim describes the kinds of actions I should perform in a general way.
The Categorical Imperative. The categorical imperative is way to check whether our maxims are good or if our maxims are bad. One version of the categorical imperative is the formula of universal law: only act according to maxims that can rationally be made universal laws. In other words, only follow rules that everyone can and should follow. A rule can be universalized only if doing so is not contradictory. For example, if I have the maxim, "I will lie when I want to" and this rule became universal, then everyone would just lie whenever they wanted to. But a lie is an attempt to deceive someone else. If everyone lied all the time, then nobody would ever expect to hear the truth, so nobody would every be deceived by lies. In short, if everyone lies all the time, lying becomes impossible! Because this rule cannot be universalized, it is a bad rule.
Suicidal Maxim. Imagine suicidal Sally. Sally might want to act according to the maxim, "end your life if living causes more pain than pleasure." Now imagine if this rule were universal. Kant thinks that if every person followed a rule that led them to kill themselves if they expected their lives to be painful, then this would go against life itself and so seems to be irrational. Kant does not think that there can be a world of rational people who follow such a rule. Sven notes that this example is not very convincing.
Promise-Keeping Maxim. Now imagine promise-breaker Bea. Bea follows the personal rule, "I will break promises when I want to." If this rule were universal, then the whole practice of promise-making and promise-keeping would cease to exist. If nobody every kept promises then nobody would ever expect promises to be kept. But a promise means that you expect a person to think that you will not break the promise. Because following the rule to break promises makes this very action impossible, it is impossible for a world of rational people to follow this universal law. Because the maxim cannot be universalized, it is a bad maxim.
In short, Kant thinks that you cannot make yourself an exception to rules.