E-commerce furnishes farmers in rural China with a novel solution accomplishing entrepreneurship transformation, but serious credit constraints still coexist with it at present, which may restrict the release of e-commerce’s potential. Therefore, this study investigates whether formal credit promotes entrepreneurial farmers’ e-commerce utilization and explores its influencing mechanism. Based on the survey data collected from 831 entrepreneurial farmers in Shaanxi province, Ningxia province and Shandong province in rural China, the propensity score matching (PSM) method was applied to measure the impact of formal credit on e-commerce utilization. The results show that formal credit contributes to a 18.41% increase of e-commerce utilization in general and increases entrepreneurial farmers’ online purchases and sales by 11.15% and 14.69%, respectively. Some groups perform significantly in the heterogeneity analysis, the most noteworthy of which are entrepreneurial farmers who are younger, belong to new type of agricultural business entities and use mobile payments. Their e-commerce utilization, including online purchases and sales, are impacted most by formal credit. Furthermore, when the bootstrap method was used to examine the mediating effect, we found that formal credit has a positive and significant effect on the utilization of e-commerce through four channels, which are internet learning, asset allocation, labor allocation and income growth. Hence, the findings suggest that the government should augment the amount of formal credit to optimize entrepreneurial farmers’ internet learning, asset allocation, labor employment and income growth, thereby promoting e-commerce to achieve entrepreneurial transformation and sustainable development in rural areas.