The present invention relates to a system and a method for improving the security of an operation for writing the memory of an active implantable medical device by long distance telemetry, in particular via network connection with a writing main device. The system and method according to the present invention comprise an intermediate proximity device allowing communication between the active implantable medical device and the main writing device and at least one unlocking tool allowing access to the active implantable medical device.