The present invention relates to the field of medical devices and discloses an implantable medical device for treating arrhythmia. The implantable medical device includes a control unit and, each coupled to the control unit, a sense amplifier, a first switch and a second switch. The sense amplifier includes a polarity selection module, an amplification unit and a filtering unit, which are sequentially connected. The first switch is disposed within the polarity selection module, and the second switch within the filtering unit. The control unit is configured to shield the sense amplifier from interference from a pacing pulse signal by providing multi-stage on/off control over the first and second switches according to a pacing period and a discharging period in a pacing interval. According to embodiments of the invention, the shielding switches in the sense amplifier are switched on/off in multiple stages according to pacing and discharging periods of a pacing pulse signal so as to shield the sense amplifier from interference from the pacing pulse signal and enhance its pacing pulse signal suppression performance.