Previous literature generally predicts that individuals with higher skills work in industries with longer production chains. However, the opposite skill-sorting pattern, a "negative skill-sorting" phenomenon, is also observed in reality. This paper proposes a possible mechanism by which both cases can happen and shows that negative skill sorting is more likely to occur when the quality of intermediate inputs degrade rapidly (or improves slowly) along the production chain. We empirically confirm our theoretical prediction by using country-industry panel data. The results are robust regardless of estimation method, control variables, and industry coverage. This study has important implications for understanding countries' comparative advantages and development patterns.