The Metaphysics of Morals by Immanuel Kant Chapter 2 Page 94

(mundus intelligibilis) is possible as a kingdom of ends, and this by virtue of the legislation proper to all persons as members. Therefore every rational being must so act as if he were by his maxims in every case a legislating member in the universal kingdom of ends. The formal principle of these maxims is: “So act as if thy maxim were to serve likewise as the universal law (of all rational beings).” A kingdom of ends is thus only possible on the analogy of a kingdom of nature, the former however only by maxims, that is self-imposed rules, the latter only by the laws of efficient causes acting under necessitation from without. Nevertheless, although the system of nature is looked upon as a machine, yet so far as it has reference to rational beings as its ends, it is given on this account the name of a kingdom of nature.