As I commented under the question, the second definition looks more contrived because it wants to accommodate the situation that $X_n$ and $X$ are not measurable or $d(X_n, X)$ is not measurable (for more details, see Section 18.2 in Asymptotic Statistics). In this situation, the set $[\lim_{n \to \infty}X_n = X]$ may not be an event so that the notation "$P[\lim_{n \to \infty}X_n = X]$" may become meaningless.
That said, the two definitions are indeed equivalent when $X_n$, $X$, and $d(X_n, X)$ are all measurable. For example, when $X_n$ and $X$ are real-valued random variables and $d(x, y) = |x - y|$. This case can be proved as follows.
In this thread, it was shown that $Y_n$ converges to $Y$ almost surely if and only if for any $\epsilon > 0$, it holds that
\begin{align}
P[\cap_{k \geq 1}\cup_{n \geq k}[|Y_n - Y| \geq \epsilon]] = 0. \tag{1}
\end{align}
Suppose $|X_n - X| \leq \Delta_n$ and $\Delta_n$ converges to $0$ almost surely, it then follows by $(1)$ that (set $Y_n = \Delta_n$, $Y = 0$) for any $\epsilon > 0$:
\begin{align}
P[\cap_{k \geq 1}\cup_{n \geq k}[|X_n - X| \geq \epsilon]]
\leq & P[\cap_{k \geq 1}\cup_{n \geq k}[\Delta_n \geq \epsilon]] = 0,
\end{align}
which implies (by the other direction of $(1)$) that $X_n$ converges to $X$ almost surely. This shows that the second definition implies the first definition.
Conversely, suppose $X_n$ converges to $X$ almost surely, then simply taking $\Delta_n = |X_n - X|$ (or if you don't want to be that extreme, take $\Delta_n = 2|X_n - X|$, say) meets all the requirements in the second definition. This shows the first definition implies the second definition. In conclusion, these two definitions are equivalent.