The spatial and temporal differentiation and impact mechanism of population migration has always been the focus of population research, and the research at home and abroad is mainly based on short-term population migration such as communication and commuting. From the perspective of social security relations transfer, this paper explores the characteristics of the medium and long-term migration and spatial and temporal differentiation of urban working population in Heilongjiang Province. Combined with the population push and pull theory and OD model, taking into account the economic and employment policy factors, a long-term population migration dynamics model is established to reflect the social security labor relations in this paper. The theoretical contributions of this paper are mainly reflected as follows: firstly, The temporal and spatial migration of population based on social security relations supplements and enriches the research content of medium and long-term population migration. Secondly, This article takes urban employees as the research object, considering economic, policy, transportation, geography, and time effects, and focuses on the migration mechanism of urban labor within the region, enriching the research on labor-related migration theory. Finally, This article uses social security big data to study the spatial flow of population, expands the existing literature based on census data research, and enriches relevant empirical research on population mobility.The researches indicate: firstly, the migration of urban working population based on social security relations is consistent with the power-law distribution of the cutoff index, showing the characteristics of Levi's flight. Secondly, population migration shows a multi-level and cross-regional distribution pattern. Thirdly, there is a certain degree of similarity in space between the population migration and relocation. Fourthly, the disorder of the migration of urban workers is increasing and the frequency of migration is higher and higher. Finally, through the simulation, the migration system of urban workers tends to a balance development.