Full Idea
In the order of ends, man (and every rational being) is an end in himself, i.e., he is never to be used merely as a means for someone (even for God) without at the same time being himself an end.
Gist of Idea
Everyone (even God) must treat rational beings as ends in themselves, and not just as means
Source
Immanuel Kant (Critique of Practical Reason [1788], I.II.II.V)
Book Reference
Kant,Immanuel: 'Critique of Practical Reason (Third edition)', ed/tr. Beck,Lewis White [Library of Liberal Arts 1993], p.138
A Reaction
The worry here is that Kant has set up an exam that you have to pass before you can be treated as a moral end. Animals and the ecosystem will fail the exam, and even some human beings will be borderline cases. We should respect everything.