We study the production and angular correlation of charm hadrons in hot and dense matter produced in high-energy nuclear–nuclear collisions within a multiphase transport model (AMPT). By triggering additional charm–anticharm quark pair production in the AMPT, the model describes the D0 nuclear modification factor in the low and intermediate pT regions in Au+Au collisions at√SNN=200 GeV reasonably well. Further exploration of the D0 pair azimuthal angular correlation for different centralities shows clear evolution from low-multiplicity to high-mul-tiplicity events, which is associated with the number of charm quark interactions with medium partons during AMPT transport.