Because to defect is the evolutionary stable strategy in the prisoner s dilemma game (PDG), understanding the mechanism generating and maintaining cooperation in PDG, i.e. the paradox of cooperation, has intrinsic significance for understanding social altruism behaviors. Spatial structure serves as the key to this dilemma. Here, we build the model of spatial PDG under a metapopulation framework: the sub-populations of cooperators and defectors obey the rules in spatial PDG as well as the colonization-extinction process of metapopulations. Using the mean-field approximation and the pair approximation, we obtain the differential equations for the dynamics of occupancy and spatial correlation. Cellular automaton is also built to simulate the spatiotemporal dynamics of the spatial PDG in metapopulations. Join-count statistics are used to measure the spatial correlation as well as the spatial association of the metapopulation. Simulation results show that the distribution is self-organized and that it converges to a static boundary due to the boycotting of cooperators to defectors. Metapopulations can survive even when the colonization rate is lower than the extinction rate due to the compensation of cooperation rewards for extinction debt. With a change of parameters in the model, a metapopulation can consist of pure cooperators, pure defectors, or cooperator-defector coexistence. The necessary condition of cooperation evolution is the local colonization of a metapopulation. The spatial correlation between the cooperators tends to be weaker with the increase in the temptation to defect and the habitat connectivity; yet the spatial correlation between defectors becomes stronger. The relationship between spatial structure and the colonization rate is complicated, especially for cooperators. The metapopulation may undergo a temporary period of prosperity just before the extinction, even while the colonization rate is declining.