How to effectively discipline related-party transactions has garnered widespread attention from both academia and practice. While extensive literature has examined the factors influencing related-party transactions, it has overlooked the impact of sanctions imposed on peers on the related-party transactions of other firms. Using panel data covering Chinese listed firms from 2002 to 2021, we find that sanctions imposed on peers have a deterrence effect on observing firms. Increasing the certainty or severity of sanctions significantly reduces related-party transactions in observing firms. Mechanism tests demonstrate that media coverage, industry competition, and social trust strengthen this deterrence effect. Further analysis suggests the deterrence effect of sanctions is primarily driven by indirect reputation effects. Additionally, we find that deterrence effect exists in both state-owned enterprises (SOEs) and non-SOEs. Our study sheds light on the efficacy of enforcement in the Chinese capital market and offers important implications for enhancing regulatory efficiency in emerging economies.