This study examines the impact of geographical proximity to government agencies on corporate litigation activities. Utilizing an extensive dataset comprising corporate lawsuits and government relocations spanning two decades (1998–2018), a difference-in-differences approach was implemented to explore the causal nexus between the distance of local governments from firm headquarters and judicial engagement. The empirical evidence reveals that closer proximity to local governments significantly reduces the judicial participation of firms. Moreover, the effect is spatially attenuated, with a stronger impact on firms located nearer to local governments. Our mechanism analysis suggests that geographical proximity strengthens the value of information communication between the government and enterprises, increasing the attention of companies towards government actions and reducing the impact of policy uncertainty, thereby making it possible to adopt dispute resolution mechanisms other than litigation. Meanwhile, the political favoritism exhibited by the government after becoming closer also to some extent suppresses the enthusiasm of companies to participate in judicial proceedings.