The present invention relates to a pharmaceutical composition for preventing or treating cardiac arrhythmia. Particularly, the present invention relates to a pharmaceutical composition containing, as an active ingredient, a CCN5 protein or a nucleotide encoding the same. The pharmaceutical composition for preventing or treating cardiac arrhythmia, of the present invention, inhibits the pathological activity of CaMKII, which induces cardiac electrical abnormalities which is the main cause of atrial arrhythmia and ventricular arrhythmia, so as to restore the electrical functions, and inhibits the activity of myofibroblasts causing structural abnormalities. Therefore, the pharmaceutical composition of the present invention can be effectively used in the prevention or treatment of cardiac arrhythmia.