The surface charges in nanosecond pulsed dielectric barrier discharge (NPDBD) under quiescent air and airflow are detected based on the Pockels effect of electro-optical crystals. In quiescent air, it is found that the surface charge spot propagates and moves in a certain direction due to the combination of the transverse electric field and the thermal accumulation during dozens of consecutive discharge cycles. However, the position of the surface charge spot remains fixed throughout a single discharge cycle (0.83 ms). At the same time, the noticeable decay of surface charges emerges in the above time scales. Furthermore, when the airflow is introduced into the discharge gap, the propagation and movement of surface charges are accelerated. With the increase of airflow velocity, the discharge transforms from a filamentary mode to a diffuse mode, and the distribution of surface charges varies from discrete to uniform. The transition point of the discharge state and charge distribution corresponds to the airflow velocity of 10 m/s. The airflow accelerates the decay of surface charges, resulting in the shrink and dispersion of surface charges, which is considered to be the fundamental reason for the airflow's potential to improve discharge uniformity. The inherent mechanism for achieving uniform discharge is revealed in this study.