Objective: The detection of QRS complexes is an important part of computer-aided analysis of electrocardiogram (ECG). However, most of the existing detection algorithms are mainly for single-lead ECG signals, which requires high quality of signal. If the signal quality decreases suddenly due to some interference, then the current algorithm is easy to cause misjudgment or missed detection. To improve the detection ability of QRS complexes under sudden interference, we study the QRS complexes information on multiple leads in-depth, and propose a two-lead joint detection algorithm of QRS complexes. Methods: Firstly, the suspected QRS complexes are screened on the main lead. For the suspected QRS complexes with low confidence and the complexes that may be missed, further accurate detection and joint judgment shall be carried out at the corresponding position of the auxiliary lead. At the same time, the adaptive threshold adjustment algorithm and backtracking mechanism are used to modify the detection results. Results: The proposed detection algorithm is validated using 48 ECG records of the MIT-BIH arrhythmia database, and achieves average detection accuracy of 99.71%, sensitivity of 99.88% and positive predictivity of 99.81%. Conclusion: The proposed algorithm has high accuracy, which can effectively deal with the sudden interference of ECG signal. Meanwhile, the algorithm requires small amount of computation, and can be embedded into hardware for real-time detection.