  In this paper, we prove the global existence and the large time decay
estimate of solutions to the two-dimensional MHD boundary layer equations with
small initial data, which is analytical in the tangential variable. The main
idea of the proof is motivated by that of \cite{PZ5}. The additional
difficulties are: 1. there appears the magnetic field; 2. the far field here
depends on the tangential variable; 3. the Reynolds number is different from
magnetic Reynolds number. In particular, we solved an open question in
\cite{XY19} concerning the large time existence of analytical solutions to the
MHD boundary layer equations.
