The effects of two kinds of common impurities (i.e., N2 and H2S) on CO2 geological storage in layered formations were investigated by numerical simulations. This study was focused on the migration behaviour and spatial distribution of CO2 plume. The effects of capillary pressure on the spread of CO2 plume in the layered formations were examined first. The results suggested that the capillary pressure was a minor influence when injecting, but it affected the migration and distribution of CO2 plume significantly during post-injection period in which, the contact area between CO2 plume and formation brine became smaller with increased capillary pressure, leading to a decrease of dissolved CO2 mass fraction. In the case of co-injection of CO2 with N2 impurity, it was found that as the N2 concentration rose up, the horizontal migration distance of CO2 plume extended, and the plume inclined to accumulate below the impermeable caprock. The phenomena were due to the enhancement of buoyance effect of CO2 plume and accordingly, the contact area between the CO2 plume and the formation brine enlarged, resulting in an increase of dissolved CO2 mass fraction. However, the effects of H2S impurity were less obvious compared with N2, by showing an inconspicuous shrinkage of CO2 plume spread.