  The recent Fermilab measurement of the muon anomalous magnetic moment yields
$4.2 \sigma$ deviations from the SM prediction when combined with the BNL E821
experiment results. In the Type-X two Higgs doublet model, we study the
consequence of imposing the observed muon $g-2$, along with the constraints
from theoretical stabilities, electroweak oblique parameters, Higgs precision
data, and direct searches. For a comprehensive study, we scan the whole
parameter space in two scenarios, the normal scenario where $h_{\rm SM} = h$
and the inverted scenario where $h_{\rm SM}=H$, where $h$ ($H$) is the light
(heavy) CP-even Higgs boson. We found that large $\tan\beta$ (above 100) and
light pseudoscalar mass $M_A$ are required to explain the muon $g-2$ anomaly.
This breaks the theoretical stability unless the scalar masses satisfy $M_A^2
\simeq M_{H^\pm}^2 \simeq m_{12}^2 \tan\beta \approx M_{H/h}^2$. The direct
search bounds at the LEP and LHC exclude the light $A$ window with $M_A
\lesssim 62.5~$GeV. We also show that the observed electron anomalous magnetic
moment is consistent with the model prediction, but the lepton flavor
universality data in the $\tau$ and $Z$ decays are not. For a separate
exploration of the model, we propose the golden mode $pp \to A h/AH \to 4 \tau$
at the HL-LHC.
