Detecting changes in the QRS complexes in ECG signals is regarded as a straightforward, noninvasive, inexpensive, and preliminary diagnosis approach for evaluating the cardiac health of patients. Therefore, detecting QRS complexes in ECG signals must be accurate over short times. However, the reliability of automatic QRS detection is restricted by all kinds of noise and complex signal morphologies. The objective of this paper is to address automatic detection of QRS complexes. In this paper, we proposed a new algorithm for automatic detection of QRS complexes using dual channels based on U-Net and bidirectional long short-term memory. First, a proposed preprocessor with mean filtering and discrete wavelet transform was initially applied to remove different types of noise. Next the signal was transformed and annotations were relabeled. Finally, a method combining U-Net and bidirectional long short-term memory with dual channels was used for the automatic detection of QRS complexes. The proposed algorithm was trained and tested using 44 ECG records from the MIT-BIH arrhythmia database and CPSC2019 dataset, which achieved 99.06% and 95.13% for sensitivity, 99.22% and 82.03% for positive predictivity, and 98.29% and 78.73% accuracy on the two datasets respectively. Experimental results prove that the proposed method may be useful for automatic detection of QRS complex task. The proposed method not only has application potential for QRS complex detecting for large ECG data, but also can be extended to other medical signal research fields.