The invention relates to the technical field of biomedical engineering and provides a use of a RyR2 protein or a RyR2 recombinant protein in preparation of an anti-heart failure drug. The RyR2 recombinant protein is a fragment or a mutant of a natural RyR2 protein, such as a SPRY1 structural domain protein, a P1 structural domain protein, a SPRY2 structural domain protein, a SPRY3 structural domain protein, a Handle structural domain protein, a HD1 structural domain protein, a HD2 structural domain protein, a central structural domain protein, an EF-hand structural domain protein, a U-type motif protein, a P2 structural domain protein, a P2 structural domain fragment protein 1, a P2 structural domain fragment protein 2 or a P2 mutant of the natural RyR2 protein. The exogenous RyR2 recombinant protein has a high expression level in normal small animal models and small animal disease models so that the left ventricular ejection fractions of the experimental animals are increased to different extents compared with the control group, the disease model animals are able to reduce the beta-adrenergic-induced ventricular tachyarrhythmia to varying degrees and the ventricular function of each treatment group is recovered to varying degrees.