Ryanodine receptor 2 (RyR2) is a Ca2+ release channel mainly located on the sarcoplasmic reticulum (SR) membrane of heart muscle cells and regulates the concentration of Ca2+ in the cytosol. RyR2 overactivation causes potentially lethal cardiac arrhythmias, but no specific inhibitor is yet available. Herein we developed the first highly potent and selective RyR2 inhibitor, TMDJ-035, containing 3,5-difluoro substituents on the A ring and a 4-fluoro substituent on the B ring, based on a comprehensive structure-activity relationship (SAR) study of tetrazole compound 1. The SAR study also showed that the amide conformation is critical for inhibitory potency. Single-crystal X-ray diffraction analysis and variable-temperature 1H NMR revealed that TMDJ-035 strongly favors cis-amide configuration, while the inactive analogue TMDJ-011 with a secondary amide takes trans-amide configuration. Examination of the selectivity among RyRs indicated that TMDJ-035 displayed high selectivity for RyR2. TMDJ-035 suppressed abnormal Ca2+ waves and transients in isolated cardiomyocytes from RyR2-mutated mice. It appears to be a promising candidate drug for treating cardiac arrhythmias due to RyR2 overactivation, as well as a tool for studying the mechanism and dynamics of RyR2 channel gating.