Wages have been distributed increasingly unequally over the past decades for most countries. While policymakers have tried different methods to stop the earnings inequality from widening, the effects have been minimal. In this paper, we propose a novel mechanism through which a preferential lending policy reduces the earnings inequality, inspired by the case of China. As most countries have, China has experienced increasing earnings inequality over the past decades; however, the inequality started to decline substantially after 2009. We argue that this change reflects the following important institutional change in China: since 2009, the local governments have been granted the ability to offer their preferred firms cheap credit. Since many of these preferred firms are unskilled-labor intensive, with a lower financing cost, they increase their investment and hire more unskilled workers, thereby reducing the earnings inequality. We incorporate this mechanism into a two-sector model and show quantitatively that our model can account for most of the decline of the earnings inequality observed in the data. Moreover, the model also predicts a surge in the aggregate investment rate, which is also in line with the data.