  A measurement of the elliptic flow ($v_2$) of prompt J/$\psi$ mesons in
high-multiplicity pPb collisions is reported using data collected by the CMS
experiment at a nucleon-nucleon center-of-mass energy $\sqrt{s_\mathrm{NN}} =$
8.16 TeV. Prompt J/$\psi$ mesons decaying into two muons are reconstructed in
the rapidity region in the nucleon-nucleon center-of-mass frame
($y_\mathrm{cm}$), corresponding to either $-$2.86 $\lt y_{\mathrm{cm}} <$
$-$1.86 or 0.94 $\lt y_{\mathrm{cm}} <$ 1.94. The average $v_2$ result from the
two rapidity ranges is reported over the transverse momentum (p$_\mathrm{T}$)
range from 0.2 to 10 GeV. Positive $v_2$ values are observed for the prompt
J/$\psi$ meson, as extracted from long-range two-particle correlations with
charged hadrons, for 2 $\lt p_{\mathrm{T}}<$ 8 GeV. The prompt J/$\psi$ results
are compared with previous CMS measurements of elliptic flow for open charm
mesons (D$^0$) and strange hadrons. From these measurements, constraints can be
obtained on the collective dynamics of charm quarks produced in
high-multiplicity events arising from small systems.
