I do believe that this question is not treated in Hartshorne. The correct statement is the following one:
Proposition: Over a complex smooth projective variety $X$, then for any sufficiently ample line bundle $L$ over $X$, we have $X \simeq \mathrm{Proj}(\oplus H^0(X,kL))$.
Proof.
To see this, you may suppose that the global sections of $L$ induce an embedding $i:X \rightarrow \mathbb P(H^0(X,L)^*)=\mathbb P^N$. The image of $X$ under this embedding is given by an ideal sheaf $I$ (which remains to be determined), and thus $X \simeq \mathrm{Proj} (\mathbb C[x_0, \ldots, x_N]/I)$. Notice also that $L \simeq i^* \mathcal O_{\mathbb P^n(1)}$.
Now there is a natural morphism of graded rings $\mathbb C[x_0, \ldots, x_N] \to \oplus H^0(X,kL)$ sending $x_i$ to $s_i$, for $(s_0, \ldots, s_N)$ a basis of $H^0(X,L)$. Its kernel is by definition the graded ideal $I$, and it just remains to prove the surjectivity, which comes from the exact sequence of sheaves
$0 \to I \otimes \mathcal O_{\mathbb P^N}(m) \to \mathcal O_{\mathbb P^N}(m) \to \mathcal O_{i(X)}(m)\to 0$
We obtain then a surjective map $H^0(\mathbb P^N, \mathcal O_{\mathbb P^N}(m)) \to H^0(X, mL)$ for any $m$ sufficiently large, thanks to Serre's vanishing theorem. Now you may change $L$ with one of its multiple, and you're done.
Remark: In this, we have hidden the (non-trivial) fact that for $L$ ample, its graded ring of section is finitely generated. This is proved in Lazarsfeld's "Positivity in Algebraic Geometry, I".