In this paper, a new feature named heartbeat shape (HBS) is proposed for ECG-based biometrics. HBS is computed from the morphology of segmented heartbeats. Computation of the feature involves three basic steps: 1) resampling and normalization of a heartbeat; 2) reduction of matching error; and 3) shift invariant transformation. In order to construct both gallery and probe templates, a few consecutive heartbeats which could be captured in a reasonably short period of time are required. Thus, the identification and verification methods become efficient. We have tested the proposed feature independently on two publicly available databases with 76 and 26 subjects, respectively, for identification and verification. The second database contains several subjects having clinically proven cardiac irregularities (atrial premature contraction arrhythmia). Experiments on these two databases yielded high identification accuracy (98% and 99.85%, respectively) and low verification equal error rate (1.88% and 0.38%, respectively). These results were obtained by using templates constructed from five consecutive heartbeats only. This feature compresses the original ECG signal significantly to be useful for efficient communication and access of information in telecardiology scenarios. © 2012 IEEE.