An active implantable medical device, in particular a pacemaker, defibrillator or cardioveter of the multisite type, including a circuit for measuring intercardiac impedance. Electrodes are placed in at least one ventricular site and one atrial site, and are connected to a circuit for the collection of cardiac signals, to detect a depolarization potential, as well as to a stimulation circuit, to apply stimulation pluses to at least some of the aforementioned sites. The measurement of a trans-pulmonary bio-impedance is obtained by injecting a current from an injection circuit (16) between the case (18) of the device and a first atrial (RA-) (or ventricular) site, and measuring a differential potential (20) between the case (18) and a point of measurement located in a second atrial (RA+) (or ventricular) site using a collection circuit. Switches are selectively operable to isolate the case (18) from the current injection and measurement of potential circuits, and to connect them to a common reference potential site, atrial or ventricular (LV-), which is distinct from the sites (RA-,RA+) to which are also connected these circuits, so as to allow a measurement of intracardiac impedance from the signal delivered by the differential potential measuring circuit. The switching is obtained by connections to an electric ground, operating independently of the current injection circuit and the differential potential measuring circuit.