The azimuthal correlations of D mesons with charged particles were measured with the ALICE apparatus in pp collisions at [Formula: see text] and p-Pb collisions at [Formula: see text] at the Large Hadron Collider. [Formula: see text], [Formula: see text], and [Formula: see text] mesons and their charge conjugates with transverse momentum [Formula: see text] and rapidity in the nucleon-nucleon centre-of-mass system [Formula: see text] (pp collisions) and [Formula: see text] (p-Pb collisions) were correlated to charged particles with [Formula: see text]. The yield of charged particles in the correlation peak induced by the jet containing the D meson and the peak width are compatible within uncertainties in the two collision systems. The data are described within uncertainties by Monte-Carlo simulations based on PYTHIA, POWHEG, and EPOS 3 event generators.