I will try to reconstruct the argument of both the first and second section in detail, as they differ slightly. I freely admit that the argument in the first section is a bit obscure and seems arbitrary at times, but I think that they are essentially identical and that the argument becoming clearer as the text goes on is kind of implied in the nature of the analytic method he announced for the first two sections.
All translations are from Kant, I. (2011). Groundwork of the Metaphysics of Morals: A German-English Edition, eds. Mary Gregor and Jens Timmermann. Cambridge: CUP.
First step: Lawfulness of the will
The first step is both in the first and the second section to bring lawfulness into play. This is where the arguments differ the most, out of reasons that are not possible to include into this answer, because they are not obvious or trivial (Oh what is in Kant?!).
In the first section it is achieved through his definition of duty. Kant argues here in three steps, whereas the second and third are explicit:
The second proposition is: an action from duty has its moral worth
not in the purpose that is to be attained by it, but in the maxim according to which it is resolved upon, and thus it does not depend on the actuality of the object of the action, but merely on the principle of willing according to which - regardless of any object of the desiderative
faculty - the action is done. (4:399-400, emphasis mine)
And the third:
The third proposition, as the conclusion from both previous ones,
I would express as follows: duty is the necessity of an action from respect
for the law. (4:400)
My proposal for the not explicit first proposition would be, hidden in the paragraphs 10 and 11 of the first section:
The moral worth of an action lies in acting not from inclination, but from duty.
I justify this above all with the last sentence of paragraph 11:
It is just there that the worth of character commences, which is moral and beyond all comparison the highest, namely that he be beneﬁcent, not from inclination, but from duty. (4:398-399)
But how does he get from one and two to three? Well, we have to keep in mind three points here:
- He has established that the (absolutely) good will has to be necessary and unconditioned before (the first seven paragraphs).
- He has established per proposition two that we are speaking of a principle of the will, i.e. a general concept.
- His definition of a law is a proposition that is both necessary and general (see 4:418-20).
Therefore, a good will has to have a principle that is a law.
This, together with the arguments he delivers himself after first just stating the proposition, makes it understandable how he can speak of law and respect:
Only what is connected with my will merely as ground, never as effect,
what does not serve my inclination, but outweighs it, or at least excludes it entirely from calculations when we make a choice, hence the mere law by itself, can be an object of respect and thus a command. (4:400)
So the argument up to here runs as follows (slightly paraphrased at times and with the necessary interim steps that I just described):
P1: The moral worth of an action lies in acting not from inclination, but from duty.
P2: An action from duty has its moral worth in the maxim (subjective principle of the willing), not in the purpose.
C1: Duty is the necessity of an action from respect for the law.
Second step: Content of such a law
We have a will that needs a principle that has the form of a unconditioned law, without taking purpose into account. At the same time we know that every action is reasoned subjectively and governed by its maxim, i.e. that the will always acts according to its maxim (follows from his definition of a maxim).
Interestingly, we don't even need the conclusion we just achieved itself for knowing what the content of the CI is. We will rather use it when argueing how it can be binding for us. For knowing what its content is, it suffices to take P1 and P2 in addition to what I summarized regarding necessity and the concept of law for closing the gap between the premises and the conclusion.
So, without any content that we can presuppose to determine the law that our maxim should accord with more concretely (otherwise the principle would not be necessary anymore, because of being conditioned), all that's left is that the subjective principle of the action, the maxim, has to be lawful in the most abstract of senses, i.e. have the form of a law as such, i.e. generality (universality, applies to every rational being) and necessity (unconditioned and not allowing for exceptions):
Since I have robbed the will of all impulses that could arise for it from following some particular law, nothing remains but as such the universal conformity of actions with law, which alone is to serve the will as its principle, i.e. I ought never to proceed except in such a way that I could also will that my maxim should become a universal law. Here, then, mere conformity with law as such (not founded on any law determined with a view to certain
actions) is what serves the will as its principle,... (4:402)
So if I want a commanding law (=imperative) that is categorical (=general and necessary), it has to have this form because of logical and linguistic reasons.
Here, basically the argumentation is more clean, and includes all the explicit definitions that make the argument of the first section easier to understand.
First step: Lawfulness of the will
This is kind of cheated, as it's in the very definition:
Every thing in nature works according to laws. Only a rational being
has the capacity to act according to the representation of laws, i.e. according to principles, or a will. (4:412)
But why does there have to be a law that is different from the laws of nature at all? This is somewhat clarified in the third section by another argument:
Since the concept of causality carries with it that of laws according to which, by something that we call a cause, something else, namely the consequence, must be posited: freedom, though it is not a property of the will according to natural laws, is not lawless because of that at all, but must rather be a causality according to immutable laws, but of a special kind; for otherwise a free will would be an absurdity.
This basically means that because the will causes something, and the very concept of causation includes lawfulness, the will, even if it is free (i.e. not acting from inclinations under laws of nature), has to act according to a law. Freedom in this sense and moral goodness are the very same, see P2 above and 4:414:
...the will is a capacity to choose only that which reason, independently
of inclination, recognizes as practically necessary, i.e. as good
Combining the aspects, we already know that if there is a free will and therefore morality, it has to act according to a law that is independent of the laws of nature.
Second step: Imperatives
Again, this is straightforwardly imposed by definitions:
The representation of an objective principle in so far as it is necessitating for a will is called a command (of reason), and the formula of the
command is called IMPERATIVE.
One thing to pay attention to here: He speaks of 'objective principle', not 'law'. Otherwise hypothetical imperatives could not be imperatives. But they in fact are objective in the sense that given the situation and the end, they have objective validity, i.e. you really ought to do this objectively in these situations if you want to achieve this.
And the difference between hypothetical and categorical imperatives (that would have helped in section one to understand why this sentence is the Categorical Imperative at all):
Now, all imperatives command either hypothetically, or categorically. The
former represent the practical necessity of a possible action as a means to
achieving something else that one Wants (or that at least is possible for one
to Want). The categorical imperative would be the one that represented an
action as objectively necessary by itself, without reference to another end. (4:414, emphasis mine)
Here the two elements pointed out earlier are entailed as well: objective necessity and - because of the lack of reference to another end - generality/universality.
Third step: Imperatives and law
As I already - for reasons of better understanding - introduced above and should be clear considering the definition now, only the categorical imperative meets the requirements imposed by the concept of a law:
For the time being, however, this much can be seen: that the categorical imperative alone expresses a practical LAW, and that the others can indeed one
and all be called principles of the will, but not laws; since what it is necessary to do merely for attaining a discretionary purpose can be regarded as
in itself contingent, and we can always be rid of the prescription if we give
up the purpose, Whereas the unconditional command leaves the will no
free discretion with regard to the opposite, and hence alone carries with it
that necessity which we demand for a law. (4:420)
Last step: Content of THE categorical imperative
In effect this argument is exactly the same as above, though arguably better witten:
But when I think of a categorical imperative I know at once what it contains. For since besides the law the imperative contains only the necessity of the maxim to conform with this law, whereas the law contains no condition to
which it was limited, nothing is left but the universality of a law as
such, with which the maxim of the action ought to conform, and it is
this conformity alone that the imperative actually represents as necessary.
There is therefore only a single categorical imperative, and it is this:
act only according to that maxim through which you can at the same time will
that it become a universal law. (4:420-21, bolds mine)
He goes through considerations at length to reach the uniqueness and necessity of there being only one Categorical Imperative. The argument ultimatively rest upon its definitions. It consists mainly out of
- the will acting from maxims (D1),
- the good will (as the moral good) being
necessary and unconditioned (P1),
- therefore the need for an ommission of all particular determinates (C1, universality/generality, follows from P1),
- a law is a necessary and universal/general proposition (D2)
- the principle of a good will being a law, as this concept includes both unconditioned necessity and generality (C2, combining P1, C1, and D2),
- only a categorical imperative meets the requirements of the concept of a law (P2), and
- as there are no particular determinates that could determine its matter, the Categorical Imperative being the maxim should have at least the form of a law is all that is left (following from D1, P2 and C2).
Considering all this together, you will therefore necessarily end up with something like "your maxims should have the form of a law, i.e. be universalisable as a universal law". The exact formulations may differ, but this is the essential proposition that will constitute an imperative as categorical. And this is why for him, there can only be ONE categorical imperative, although there certainly can be loads of different formulations.