An active implantable medical device (e.g., implantable pacemaker or defibrillator), for detection of QRS complexes in noisy signals. Functional units (12-16) collect, amplify, prefilter and convert from analog-to-digital an endocardial signal, and digital functional units (18) provide signal processing and analysis of the digitized signal, for delivery of an indicator corresponding to a signal peak detection representative of the presence of a QRS complex in the endocardial signal. A double threshold comparator (30) is employed, receiving as input (28) the digitized signal and outputting (40) the indicator of peak detection when, cumulatively: the amplitude (A) of the input signal exceeds a peak amplitude threshold (SA), and the peak amplitude threshold is exceeded for a period (W) greater than a peak width threshold (SW). The peak amplitude threshold (SA) is a variable adaptive threshold, according to a noise level calculated from the energy (RMS) of the input signal.