Using the AMPT model with string melting, we investigate the effect of collective phase transition of partons on the two-pion HBT radii. The results indicate that collective hadronization of partons at t = 5 fm/c flattens the transverse mass dependence of HBT radii, especially for transverse radii R o and R s . The radii calculated from the pion emission function (exclude pions with freeze-out time after 30 fm/c) are consistent with the HBT radii obtained by Gaussian fit to the correlation function. The r-t correlation and coordinate-momentum correlation of a pion source for collective hadronization are relatively weaker than those for parton-wise hadronization.