There are two distinct questions in your post:
- Why should we ground morals at all?
- How is morality linked to the idea of persons as ends in themselves?
I will try to answer both.
Part 1: Why "grounding" morals at all?
For Kant, a moral judgement is distinct since it is conceived as something that should not only be so for me, and not only because of very particular circumstances, but that one ought to do because it is the right thing to do (period!). This necessarily means that we need a common ground, a first principle of morality - one that is beyond the relatively arbitrary particularities of a given person or situation - so that we do not end up with several "moralities":
Everyone must admit that a law, if it is to hold morally, i.e. as the ground of an obligation, must carry with it absolute necessity; [...] that the ground of the obligation here must not be sought in the nature of the human being, or in the circumstances of the world in which he is placed, but a priori solely in concepts of pure reason, and that any other prescription that is founded on principles of mere experience - and even a prescription that is in some certain respect universal, in so far it relies in the least part on empirical grounds, perhaps just for a motivating ground - can indeed be called a practical rule, but never a moral law. (Groundwork of the Metaphysics of Morals, Ak. 4:389)
One might be tempted to say that if this was his starting point, it is not surprising that he concluded the CI (or something similar) to be a necessary grounding of morality, i.e. that this is a bit circular since he presupposed something that had to lead to this.
But, as a matter of fact, that is (empirically) how we think about specifically moral things (as opposed to a narrow understanding of ethics as "living a happy - and not necessarily morally good - life"), see
Jennifer C. Wright , Piper T. Grandjean & Cullen B. McWhite (2013) The
meta-ethical grounding of our moral beliefs: Evidence for meta-ethical pluralism, Philosophical Psychology, 26:3, 336-361, DOI: 10.1080/09515089.2011.633751 (their empirical data shows the paradoxical outcome that while we are ethical pluralists, we are moral objectivists)
Therefore, this whole thing is not simply a philosophical apprentice piece to do some proving, but looking into (analysing) what it really means if we think of morality as something that is about "you ought to do that because it is the right thing to do" - which we still do.
Closing remark: Kant's real problem worthy of proof was not what I just wrote, but rather whether and how such a thing as morality (in the strict sense above) is possible in a causally determined world at all.
Step 2: How does "person is an end in itself" fit in there?
This part of your question has two aspects as well:
- What does the idea have to do with morality?
- How should knowing (this part of) Kant help us with being moral in everyday life?
Persons as ends in themselves and morality
This is what Kant explains in his derivation of the second formula in his Groundwork (4:427-29) at length. A summary could be made as follows:
The "worth" of an action is always measured in respect to an end: If the action is efficacious to reach an end - a means to reach it - it is in that respect "good". But as we think a moral good to be absolute (as seen above), a moral action and its end cannot be merely relative in their worth. He states:
[R]ational beings are called persons, because their nature already
marks them out as ends in themselves, i.e. as something that may not be
used merely as a means, and hence to that extent limits all choice (and
is an object of respect). These are therefore not merely subjective ends,
the existence of which, as the effect of our action, has a worth for us; but
rather objective ends, i.e. entities whose existence in itself is an end, an
end such that no other end can be put in its place, for which they would
do service merely as means, because without it nothing whatsoever of
absolute worth could be found; but if all worth were conditional, and
hence contingent, then for reason no supreme practical principle could
be found at all. (Ak. 4:428, bolded mine)
In other words: In their capacity to set ends, rational beings have to be respected as objective ends, and constitute an absolute worth (on page 4:435, he calls this worth dignity) that has to be part of every moral action. If there was no absolute worth, there could not be a "supreme practical principle", i.e. a principle of morality, at all.
Hence, the very idea of morality, together with an analysation of the structure of actions (ends, means, incentives, etc.) lead to the idea that those who act and set ends themselves should be part of our ends and actions as absolute limit of our freedom.
How does this help us to be moral?
Kant himself thought the formulation to actually be more intuitive than the original formulation:
The above three ways of representing the principle of morality are
fundamentally only so many formulae of the selfsame law, one of
Which of itself unites the other two Within it. However, there is yet a
dissimilarity among them, Which is indeed subjectively rather than objectively practical, namely to bring an idea of reason closer to intuition
(according to a certain analogy) and thereby to feeling. (4:436)
If you want to incorporate the idea of persons as ends in themselves into your everyday life, it may be helpful to really just keep in mind that it is a matter of respect for others as persons to consider their ability to make choices of their own in your every course of action. This is also how he applies the formula himself:
someone who has it in mind to make a lying promise to others will
see at once that he wants to make use of another human being merely
as a means, who does not at the same time contain in himself the end.
For the one l want to use for my purposes by such a promise cannot
possibly agree to my way of proceeding with him and thus himself contain the end of this action. This conflict with the principle of other
human beings can be seen more distinctly if one introduces examples of
attacks on the freedom and property of others. For then it is clear that
the transgressor of the rights of human beings is disposed to make use of
the person of others merely as a means, without taking into consideration that, as rational beings, they are always to be esteemed at the same
time as ends, i.e. only as beings who must, of just the same action, also
be able to contain in themselves the end. (4:429-30)
In other words: Not using others merely as means can be understood as meaning that they should be able to (RATIONALLY! - personal particularities and interests can be ignored) "agree" with you affecting their lives and choices the way your action would do, i.e. "contain the end" (and its necessary means) as persons (free, rational agents with the ability to set ends themselves).
I guess this is quite a good rule of thumb regarding moral behaviour.