Suppose the following takes place in the category of sets.
Let $f:X \rightarrow 0$ be any morphism into the initial object. I want to prove that the unique ${!}:0 \rightarrow X$ is an inverse to $f$. That $f {!} =id$ is clear since $0$ is initial, but the other way i can't see what to do other than use the fact that the category has exponentials.
Solution (possible):
Since the unique arrow $0 \to X$ corresponds to any $X \times 0 \to X$ which correspond to $0 \to X^X$ of which there is only one, the constant map sending everything to the identity. Hence, ${!} \circ f = id$.
It generalizes to cartesian closed categories. You want to show that in such a category, if there is an arrow $X\to 0$, then $X\simeq 0$.
So assume you have such an arrow and consider the arrow $g: X\to X\times 0$ that you get from it and $id_X$, and $pr$ the projection $X\times 0\to X$. Then $g\circ pr : X\times 0 \to X\times 0$, and so as $X\times 0$ is initial in a ccc (I think I've shown this in another post), $g\circ pr = id_{X\times 0}$. Moreover by definition of $g$, $pr\circ g = id_X$. Thus $X\simeq X\times 0 \simeq 0$, $X$ is initial and that works.
(I advise you to draw the diagrams to see it clearly)
If you want another proof that $X\times 0$ is initial in a cartesian closed category, let me know (that's where you use the exponentials)