An active implantable medical device with atrial pacing for the treatment of diastolic heart failure. This device comprises circuits and leads for collecting right and left atrial events (16,18) and pacing the left atrium (18) and a sensor detecting myocardium contractions, preferably an endocardial acceleration sensor (20), delivering a signal representative of the myocardium contractions. Analysis of the signal allows a determination of the presence or absence of a detectable left atrial contraction distinguishable from the ventricular contraction. An interatrial delay is applied between the collection of a right atrial depolarization and the delivery of a left atrial pacing pulse. In the absence of left atrial contraction, the interatrial delay is iteratively reduced in successive cardiac cycles from an initial value to an adjustment value ensuring that a left atrial contraction appears, and then so maintained while the presence of a left atrial contraction continues.