  We study the excesses of $R(D^{(*)})$ and muon $g-2$ in the framework of a
two-Higgs-doublet model with top quark flavor-changing neutral-current (FCNC)
couplings. Considering the relevant theoretical and experimental constraints,
we find that the $R(D^{(*)})$ and muon $g-2$ excesses can be simultaneously
explained in a parameter space allowed by the constraints. In such a parameter
space the pseudoscalar ($A$) has a mass between 20 GeV and 150 GeV so that it
can be produced from the top quark FCNC decay $t\to A c$. Focusing on its
dominant decay $A\to \tau\bar{\tau}$, we perform a detailed simulation on
$pp\to t\bar{t}\to Wb Ac\to jjbc\tau\bar{\tau}$ and find that the $2\sigma$
upper limits from a data set of 30 (100) fb$^{-1}$ at the 13 TeV LHC can mostly
(entirely) exclude such a parameter space.
