The invention discloses an electronic cigarette capable of detecting the service life. The electronic cigarette comprises an atomizer and a battery; a heating wire and a storage chip are arranged on the inner side of the atomizer; the storage chip is located on one side of the heating wire, a battery cell and a main controller are arranged on the inner side of the battery, the main controller is located above the battery cell, an output switch is arranged on the main controller, ejector pins are further distributed at the upper end of the battery, and the atomizer and the battery are connectedin a pluggable mode through the ejector pins. According to the invention, the aging working time of the atomizer is recorded in the storage chip in the atomizer; when the battery is replaced, recorded data cannot be affected, data cannot be lost after power failure, data communication between the battery and the atomizer is achieved in an ejector pin mode, no data line exists, plugging and unplugging are convenient, a user can perceive whether the atomizer fails or not through battery prompts, simplicity and effectiveness are achieved, and the atomizer is prevented from aging to affect smoking taste.