The first critique of the ontological argument is formulated in the Latin Dissertation "Nova Dilucidatio" (1755).
"Proposition VI. To say that something has the ground of its existence within itself is absurd.
For whatever contains within itself the ground of the existence of some thing is the cause of that thing. Suppose, therefore, that there is
something which has within itself the ground of its own existence, then it will be the cause of itself. Since, however, the concept of a cause is by nature
prior to the concept of that which is caused, the latter being later than the former, it would follow that the same thing would be simultaneously both earlier
and later than itself, which is absurd.
COROLLARY. If anything, therefore, is said to exist absolutely necessarily, that thing does not exist because of some ground; it exists
because the opposite cannot be thought at all. This impossibility of the opposite is the ground of the knowledge of existence, but an antecedently determining
ground is completely absent. It exists; and in respect of the thing in question, to have said and to have conceived this of it is sufficient.
SCHOLIUM. I find, indeed, the view repeatedly expressed in the teachings of modem philosophers [Baumgartner and Wolff] that God has the
ground of His existence posited in Himself. For my part, I find myself unable to support this view. To these good men it seems, namely, somehow rather hard to
deny that God, the ultimate and most complete principle both of grounds and of causes, should contain within Himself the ground of Himself. Thus they maintain
that, since one may not assert that there is a ground of God which is external to Him, it follows that He contains concealed within Himself the ground of
Himself. But there could scarcely be anything more remote from sound reason than this. For when, in a chain of grounds, one has arrived at the beginning, it is
self-evident that one comes to a stop and that the questioning is brought to an end by the completeness of the answer. Of course, I know that appeal is made to
the concept itself of God; and the claim is made that the existence of God is determined by that concept. It can, however, easily be seen that this happens
ideally, not really. Form for yourself the concept of some being or other in which there is a totality of reality. It must be conceded that, given this
concept, existence also has to be attributed to this being. And, accordingly, the argument proceeds as follows: if all realities, without distinction of
degree, are united together in a certain being, then that being exists. But if all those realities are only conceived as united together, then the existence of
that being is also only an existence in ideas. The view we are discussing ought, therefore, rather to be formulated as follows: in framing the concept of a
certain Being, which we call God, we have determined that concept in such a fashion that existence is included in it. If, then, the concept which we have
conceived in advance is true, then it is also true that God exists. I have said these things, indeed, for the sake of those who support the Cartesian
argument." (pp. 14-15).
Kant gives a proof of the existence of God in the Proposition VII:
"There is a Being, the existence of which is prior to the very possibility both of Itself and of all things. This Being is, therefore, said
to exist absolutely necessarily. This Being is called God" (cfr. pp. 15-17).
This proof was abandoned in the other writings by Kant.
From: Immanuel Kant, A new elucidation of the first principles of metaphysical cognition (1755), In: Theoretical Philosophy,
1755-1770, Translated and edited by David Walford in collaboration with Ralf Meerbote, Cambridge: Cambridge University Press, 1992.