  The Dirac equation for an electron in two spatial dimensions in the Coulomb
and homogeneous magnetic fields is an example of the so-called quasi-exactly
solvable models. The solvable parts of its spectrum was previously solved from
the recursion relations. In this work we present a purely algebraic solution
based on the Bethe ansatz equations. It is realised that, unlike the
corresponding problems in the Schr\"odinger and the Klein-Gordon case, here the
unknown parameters to be solved for in the Bethe ansatz equations include not
only the roots of wave function assumed, but also a parameter from the relevant
operator. We also show that the quasi-exactly solvable differential equation
does not belong to the classes based on the algebra $sl_2$.
