Using data from the 2015-2021 China Household Finance Survey, this paper analyzes the impact of local urbanization of inflow residents on the short-run enrollment opportunities and long-run human capital accumulation of accompanying children with migrants with the help of the exogenous shock of household registration liberalization. It is found that local urbanization directly increases the probability of enrollment of migrant children in compulsory education in the short run, but has no significant effect on their probability of enrollment in senior high school. The mechanism test shows that in the process of local urbanization, in terms of public education expenditure, only the education expenditure for the compulsory education stage has increased, and there is no significant change in the education expenditure for the senior high school stage; in terms of household education expenditure, the education expenditure of households switching from compulsory education stage has increased, of which the expenditure on campus activities and tutorials have increased significantly, and the improvement in the expenditure on interest categories is not obvious. Heterogeneity analysis shows that the relaxation of household registration in the inflow area mainly led to a significant increase in the probability of enrollment in compulsory education in cities with intra-provincial migration, girls, and lower thresholds for school enrollment, as well as in cities with higher income levels. In the long run, the long-term education level, employment rate and business income level are higher for the group that completes citizenship at and before the compulsory education stage, but the wage income boost is higher for the group that citizenship at the high school stage. The findings of this paper have important implications for further improving the new urbanization strategy and optimizing the allocation of educational resources.