The extent to which a country can benefit from trade openness crucially depends on its ease of reallocating resources. However, we know little about the role of domestic frictions in shaping the effects of trade policies. I address this question by analyzing the impact of tariff reductions on the spatial allocation of labor in China, and how this impact depends on migration frictions that stem from China's household registration system (hukou). I first provide reduced-form evidence that input trade liberalization has induced significant spatial labor reallocation in China, with a stronger effect in regions with less hukou frictions. Then, I construct and estimate a quantitative spatial model with input-output linkages and hukou frictions to examine the general equilibrium effects of tariff reductions and perform counterfactuals. The quantitative exercise shows that trade liberalization increases China's welfare by 0.63%. Abolishing the hukou system leads to a direct welfare improvement of 1.51%. Additionally, it increases gains from tariff reductions by 2% and alleviates its negative distributional consequences. In this process, I develop a novel measure of migration frictions associated with the hukou system.