I'm expanding Beni Bogosel's comment. We have the IVP
$$x'=f(t,x)\ ,\qquad x(t_0)=x_0\ ,$$
where $f$ is continuous on an open set $\Omega$ of the $(t,x)$-plane and locally Lipschitz-continuous with respect to $x$ on $\Omega$. This IVP has a ${\it maximal\ solution}$ $\ t\mapsto \phi(t) \ (\alpha < t < \beta)$ with the following properties:
(i) For any solution $\psi$ on some $t$-interval $(a,b)$ one has ${\rm graph}(\psi)\subset{\rm graph}(\phi)$.
(ii) For any compact set $K\subset\Omega$ with $(t_0,x_0)\in K$ the graph of $\phi$ will ultimately leave $K$.
I'll only sketch a proof of (ii). Assume that there is a sequence $t_n \to \beta\!-\ $ with $(t_n,\phi(t_n))\in K$. Taking a subsequence we may assume that $(t_n,\phi(t_n))\to (\tau,\xi)\in K\subset\Omega$. By assumption there are a neighbourhood $U \subset \Omega$ of $(\tau,\xi)$ and constants $L>0$, $M>0$ with
$$|f(t,x)|\leq M\ , \qquad |f(t,x)-f(t,x')|\leq L|x-x'|\qquad\forall\ (t,x), (t,x')\in U\ .$$
There is a $\rho>0$ with $L\rho<1$ and $Q:=[\tau-\rho,\tau+\rho]\times[\xi-M\rho,\xi+M\rho]\subset U$.
Put $\rho':={3\over4}\rho$ and chose an $n$ with $t_n > \tau - {\rho\over4}$, $|\phi(t_n)-\xi|\leq {M\rho\over4}$. Then $$Q':=[t_n-\rho',t_n+\rho']\times[\phi(t_n)-M\rho',\phi(t_n)+M\rho']\subset Q\subset U\ .$$ The proof of the uniqueness theorem then shows that the IVP with initial point $(t_n, \phi(t_n))$ has a solution at least on the interval $[t_n-\rho',t_n+\rho']$, which in turn implies that $\phi$ can be extended to the right at least to $t_n+\rho'\geq \beta+\rho/2$, contradicting the definition of $\beta$.