ion channels serve important roles in the excitation-contraction coupling of cardiac myocytes. Previous studies have shown that the overexpression or activation of intermediate-conductance calcium-activated potassium channel (SK4, encoded by KCNN4) in embryonic stem cell-derived cardiomyocytes can significantly increase their automaticity. The mechanism underlying this effect is hypothesized to be associated with the activation of hyperpolarization-activated cyclic nucleotide-gated channel 2 (Hcn2). The aim of the present study was to explore whether a biological pacemaker could be constructed by overexpressing SK4 alone or in combination with Hcn2 in a rat model. Ad-green fluorescent protein (GFP), Ad-KCNN4 and ad-Hcn2 recombinant adenoviruses were injected into the left ventricle of Sprague-dawley rat hearts. The rats were divided into a GFP group (n=10), an SK4 group (n=10), a HCN2 group (n=10) and an SK4 + HCN2 (SK4/Hcn2) group (n=10). The isolated hearts were perfused at 5-7 days following injection, and a complete heart block model was established. Compared with the GFP group, overexpressing SK4 alone did not significantly increase the heart rate after establishment of a complete heart block model [98.1±8.9 vs. 96.7±7.6 beats per min (BPM)], The heart rates in the SK4/Hcn2 (139.9±21.9 BPM) and HCN2 groups (111.7±5.5 BPM) were significantly increased compared with the GFP and SK4 groups, and the heart rates in the SK4/Hcn2 group were significantly increased compared with the SK4 or Hcn2 groups. In the HCN2 (n=8) and the SK4/HCN2 (n=7) groups, the shape of the spontaneous ventricular rhythm was the same as the pacing-induced ectopic rhythm in the transgenically altered site. By contrast, these rhythms were different in the SK4 (n=10) and GFP (n=10) groups. There were no significant differences in action potential duration alternans or ventricular arrhythmia inducibility between the four groups (all P>0.05). Western blotting, reverse transcription-quantitative Pcr and immunohistochemistry analyses showed that the expression levels of SK4 and Hcn2 were significantly increased at the transgene site. Biological pacemaker activity could be successfully generated by co-overexpression of SK4 and Hcn2 without increasing the risk of ventricular arrhythmias. The overexpression of SK4 alone is insufficient to generate biological pacemaker activity. The present study provided evidence that SK4 and Hcn2 combined could construct an ectopic pacemaker, laying the groundwork for the development of improved biological pacing mechanisms in the future.