Proof Suppose first that $(M,d)$ is limit-point compact (also known as satisfying the Bolzano Weiertrass property.) Pick a sequence in $(M,d)$. If the set $S=\{x_1,\ldots\}$ is finite, some element $x_m$ repeats infinitely often, and this is clearly a limit point. If $\{x_1,\ldots,\}$ is infinite, it has a limit point $x$.
In particular, taking $\varepsilon =1$, we can pick a least natural $n_1$ in $\{n:x_n\in B(x,1)\}$. The set $S_1=S-\{x_1,\ldots,x_{n_1}\}$ is still infinite, and $x$ is still a limit point. Take $\varepsilon=1/2$, and we may pick a least $n_2$ in $\{n:x_n\in B(x,1/2)\}$. Note $x_{n_2}\in B(x,1)$, so $n_2>n_1$. Suppose we have constructed $n_1<\cdots <n_k$ such that $n_i$ is the least natural in $$\{n:x_n\in B(x,i^{-1})\}$$ Let $S_i=S-\{x_1,\ldots,x_{n_i}\}$. Then $x$ is still a limit point of $S_i$, and we may pick a least $n_{k+1}$ in $\{n:x_n\in B(x,(k+1)^{-1})\}$. Again, $n_{k+1}>n_k$, since the balls are nested. The construction goes through, and we get a sequence $n_1<n_2<n_3<\cdots$ with $x_{n_j}\to x$.
Conversely, assume $(M,d)$ is sequentially compact, and let $S\subseteq M$ be infinite. Then in particular it contains a countably infinite subset $S'=\{x_1,\ldots\}$, and $(x_n)_{n\geqslant 1}$ is a sequence of points in $M$, whose limit point will be a limit point of $S'$ and hence of $S$.
See here for a proof that compactness $\iff$ Bolzano Weiertrass property for second countable spaces (so in particular for metric spaces). Observe the above proof works for any second countable space by replacing $B(x,i^{-1})$ by some nested countable nbhd system at $x$.