Full Idea
An action done from duty has its moral worth, not in the purpose to be attained by it, but in the maxim according to which it is decided upon.
Gist of Idea
Dutiful actions are judged not by purpose, but by the maxim followed
Source
Immanuel Kant (Groundwork of the Metaphysic of Morals [1785], 399.13)
Book Reference
Kant,Immanuel: 'The Moral Law (Groundwork of Morals)', ed/tr. Paton,H.J. [Hutchinson 1948], p.65