The prompt D-0 meson azimuthal anisotropy coefficients, v(2) and ?v(3), are measured at midrapidity ( |y| < 1.0) in Pb-Pb collisions at a center-of-mass energy root s(NN) = 5.02 TeV per nucleon pair with data collected by the CMS experiment. The measurement is performed in the transverse momentum (p(T)) range of 1 to 40 GeV/c, for central and midcentral collisions. The v(2) coefficient is found to be positive throughout the p(T) range studied. The first measurement of the prompt D-0 meson v(3) coefficient is performed, and values up to 0.07 are observed for p(T) around 4 GeV/c. Compared to measurements of charged particles, a similar p(T) dependence, but smaller magnitude for p(T) < 6 GeV/r, is found for prompt D-0 meson v(2) and v(3) coefficients. The results are consistent with the presence of collective motion of charm quarks at low p(r) and a path length dependence of charm quark energy loss at high p(r), thereby providing new constraints on the theoretical description of the interactions between charm quarks and the quark-gluon plasma.