China’s urban commercial banks are more likely to face risks with the rapid development of Internet finance. However, few studies unfold the impact of Internet finance on the risk-taking level of urban commercial banks and explore their role path in depth. To study the relationship between the two and their path of action, this paper takes 62 city commercial banks in China from 2011 to 2020 as research objects and makes empirical tests by Stata. The intermediary effect model is used to study its impact path from the perspectives of assets, liabilities, and intermediate services. The conclusions are as follows: (1) Internet finance aggravates the risk-taking of urban commercial banks; (2) This effect shows heterogeneity in listed and non-listed, trans-region and non-trans-region urban commercial banks; (3) Net interest margin, debt structure, and non-interest income show the mediating effect when Internet finance affects the risk-taking of urban commercial banks. The results are beneficial for urban commercial banks to change their business strategies with their characteristics and achieve sustainable and healthy development.