This paper studies how the scarcity of different types of workers in a region shapes firm innovation across industries, using the unbalanced regional sex ratios in China as a source of identification strategy. The empirical results show that the shortage of female workers has spurred firms in female-intensive industries to innovate more, particularly in industries with low substitution between female and male workers, consistent with the price effect of the directed technical change theory. In male-intensive industries with high elasticity of substitution and regions with more skewed local sex ratios, firms are more innovative, demonstrating that the market size effect of the directed technical change theory is also at play.