  We study the production of the exotic charged charmonium-like state
$Z_c^{\pm}(3900)$ in $p \bar p$ collisions through the sequential process
$\psi(4260) \rightarrow Z_c^{\pm}(3900) \pi^{\mp}$, $Z_c^{\pm}(3900)
\rightarrow J/\psi \pi^{\pm}$. Using the subsample of candidates originating
from semi-inclusive weak decays of $b$-flavored hadrons, we measure the
invariant mass and natural width to be $M=3902.6^{+5.2}_{-5.0}{\rm \thinspace
(stat)}^{+3.3}_{-1.4}{\rm \thinspace (syst)}$ MeV and $\Gamma=32
^{+28}_{-21}{\rm \thinspace (stat)} ^{+26}_{-7}{\rm \thinspace (syst)}$ MeV,
respectively. We search for prompt production of the $Z_c^{\pm}(3900)$ through
the same sequential process. No significant signal is observed, and we set an
upper limit of 0.66 at the 95\% credibility level on the ratio of prompt
production to the production via $b$-hadron decays. The study is based on
$10.4~\rm{fb^{-1}}$ of $p \overline p $ collision data collected by the D0
experiment at the Fermilab Tevatron collider.
