This study introduces a novel watermarking technique for electrocardiogram (ECG) signals. Watermarking embeds critical information within the ECG signal, enabling data origin authentication, ownership verification, and ensuring the integrity of research data in domains like telemedicine, medical databases, insurance, and legal proceedings. Drawing inspiration from image watermarking, the proposed method transforms the ECG signal into a two-dimensional format for QR decomposition. The watermark is then embedded within the first row of the resulting R matrix. Three implementation scenarios are proposed: one in the spatial domain and two in the transform domain utilizing discrete wavelet transform (DWT) for improved watermark imperceptibility. Evaluation on real ECG signals from MIT-BIH Arrhythmia database and comparison to existing methods demonstrate that the proposed method achieves: (1) higher Peak Signal-to-Noise Ratio (PSNR) indicating minimal alterations to the watermarked signal, (2) lower bit error rates (BER) in robustness tests against external modifications such as AWGN noise (additive white Gaussian noise), line noise and down-sampling, and (3) lower computational complexity. These findings emphasize the effectiveness of the proposed QR decomposition-based watermarking method, achieving a balance between robustness and imperceptibility. The proposed approach has the potential to improve the security and authenticity of ECG data in healthcare and legal contexts, while its lower computational complexity enhances its practical applicability.