Immanuel Kant maintains that humanity--defined as uniquely human characteristics of rationality, elevated understanding, pursuit of plans and ambitions, and autonomy of thought and action--is an end goal in itself. In other words, the development and elevation of one's and others' humanity is a goal in its own right. To use humanity (rationality, autonomy, ambition, etc.) as a means merely to achieve another kind of goal (wealth, power, prestige, etc) is an improper understanding of and use of humanity.
Humanity as an end in itself requires uplifting one's self and others by developing virtue as well as intellectual and talent capacities. On the other hand, humanity as a means to another goal allows for trampling on others and mistreating them and submitting them to defamation, ridicule, and servility without regard for your or their humanity. Further, humanity as an end also requires avoiding self-abuse, self-destruction, dishonesty, and servile attitudes. On the other hand, humanity as a means to another goal allows for self-destruction and self-abuse, manipulation of others, dishonesty and deceit, and anything else that will bring the goal closer, whether money or power or whatever else.