A measurement of the elliptic flow (v2) of prompt J/ψ mesons in high-multiplicity pPbcollisions is reported using data collected by the CMS experiment at a nucleon-nucleon center-of-mass energy sNN=8.16TeV. Prompt J/ψ mesons decaying into two muons are reconstructed in the rapidity region in the nucleon-nucleon center-of-mass frame (ycm), corresponding to either −2.86<ycm<−1.86 or 0.94<ycm<1.94. The average v2 result from the two rapidity ranges is reported over the transverse momentum (pT ) range from 0.2 to 10 GeV. Positive v2 values are observed for the prompt J/ψ meson, as extracted from long-range two-particle correlations with charged hadrons, for 2<pT<8 GeV. The prompt J/ψ results are compared with previous CMS measurements of elliptic flow for open charm mesons (D0) 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.