We study the kinematics of 129 W UMa binaries and we discuss its implications on the contact binary evolution. The sample is found to be heterogeneous in the velocity space. That is, kinematically younger and older contact binaries exist in the sample. A kinematically young (0.5 Gyr) subsample (moving group) is formed by selecting the systems that satisfy the kinematical criteria of moving groups. After removing the possible moving group members and the systems that are known to be members of open clusters, the rest of the sample is called the field contact binary (FCB) group. The FCB group is further divided into four groups according to the orbital period ranges. Then, a correlation is found in the sense that shorter-period less-massive systems have larger velocity dispersions than the longer-period more-massive systems. Dispersions in the velocity space indicate a 5.47-Gyr kinematical age for the FCB group. Compared with the field chromospherically active binaries (CABs), presumably detached binary progenitors of the contact systems, the FCB group appears to be 1.61 Gyr older. Assuming an equilibrium in the formation and destruction of CAB and W UMa systems in the Galaxy, this age difference is treated as an empirically deduced lifetime of the contact stage. Because the kinematical ages (3.21, 3.51, 7.14 and 8.89 Gyr) of the four subgroups of the FCB group are much longer than the 1.61-Gyr lifetime of the contact stage, the pre-contact stages of the FCB group must dominantly be producing the large dispersions. The kinematically young (0.5 Gyr) moving group covers the same total mass, period and spectral ranges as the FCB group. However, the very young age of this group does not leave enough room for pre-contact stages, and thus it is most likely that these systems were formed in the beginning of the main sequence or during the pre-main-sequence contraction phase, either by a fission process or most probably by fast spiralling in of two components in a common envelope.