The invention relates to a device (10) for injecting a liquid into a body, in particular that of a patient, of the type that comprises: a base (20) bearing an injection needle (22) that is to be inserted into the body an injection conduit (24) connected to the needle (22) means (26) for extracting the needle (22) from the patient, including a plunger (52) mounted such that it can slide in relation to the base (20) between a needle (22) use position and a needle (22) extraction position and means (28) for generating excess pressure in the injection conduit (24) as the needle (22) is extracted, including a flexible section (53) formed in the injection conduit (24), a cam surface (54) rigidly connected to the plunger (52), and a supporting surface rigidly connected to the base (20), in order to compress said flexible section (53) between the cam surface (54) and the supporting surface radially and perpendicularly to the needle (22) as the plunger (52) slides towards the needle (22) extraction position. The invention is characterized in that it includes means (56) for retaining the flexible section (53) substantially perpendicular to the needle (22).