Mitigating income inequality among migrant workers is an important measure for improving the income distribution system and achieving common prosperity. As a new economic form, the digital economy has a profound impact on the income distribution pattern in China. Based on the 2012-2018 China Mobility Dynamic Monitoring Survey (CMDS) data and the “Broadband China” policy pilot, this paper examines the impact of the digital economy on income inequality among migrant workers using a multi-period difference-in-differences method. It is found that the digital economy significantly mitigates income inequality among migrant workers and has a stronger mitigating effect on income inequality among low-skilled migrant workers and an insignificant effect on income inequality among high-skilled migrant workers. This finding remains robust after multiple stability checks, including placebo tests, demonstrating the inclusive nature of the digital economy. Mechanism analysis shows that the digital economy alleviates income inequality among migrant workers mainly through three channels: expanding social capital, improving information accessibility, and promoting employment for migrant workers. Heterogeneity analysis shows that the alleviation of migrant workers’ income inequality by the digital economy shows a strong “digital divide” in two dimensions: age and region. Therefore, it is suggested that while strengthening the digital economy to reduce income inequality among migrant workers and empowering the strategic goal of achieving common prosperity, we should also address the “digital divide” generated by the digital economy in the income distribution of migrant workers to avoid exacerbating income inequality.