Using e+e− annihilation data corresponding to an integrated luminosity of 2.93 fb−1 taken at a center-of-mass energy of 3.773 GeV with the BESIII detector, we report the first measurements of the branching fractions of the inclusive decays D0→π+π+π−X and D+→π+π+π−X, where pions from KS0 decays have been excluded from the π+π+π− system and X denotes any possible particle combination. The branching fractions of D0(D+)→π+π+π−X are determined to be B(D0→π+π+π−X)=(17.60±0.11±0.22)% and B(D+→π+π+π−X)=(15.25±0.09±0.18)%, where the first uncertainties are statistical and the second systematic.