The purpose of this research was to determine how geographic distance affects corporate social responsibility (CSR) activities within China. Our argument focuses on whether the impact of the distance between countries on CSR activities also applies to the impact of the distance within a country between Chinese enterprises and local governments and the central government on CSR. Most previous studies of the impact of geographic distance on CSR focused on the distance between countries, reporting opposing claims. Multinational enterprises (MNEs) need to overcome the liability of foreignness (LOF) in host countries: the greater the distance, the worse the disadvantage. MNEs will choose CSR to shorten the distance from the host country. Hence, CSR activities should have a positive relationship with the distance from the host country. Conversely, due to the various differences caused by distance, it is difficult for the national sovereignty of the home country and the host country to resonate, so the distance between CSR activities and the host country should be negatively related. In this study, 5147 companies listed on the Shanghai Stock Exchange and Shenzhen Stock Exchange from the China Stock Market and Accounting Research (CSMAR) database from 2009 to 2018 were selected as the research objects to analyze the impact of the geographical distance between companies and the Central Government and local governments on CSR activities within China. Our results show that the effect of the distance between countries on CSR also applies within countries, and our results support the argument that distance and CSR are negatively correlated. This research enriches the understanding of CSR practices of Chinese domestic companies and provides new inspiration for multinational companies that plan to enter China in overcoming LOF.