An electronic endoscope (10) is detachably connected to a processor (12) via a first control connector (24) and a second control connector (40). Contacts provided at side ends of the flat-shaped second control connector are connected to a CPU (60). The CPU detects start of removal of the first control connector in response to a change in voltage of one of ports, to which the contacts (46e, 46f) are connected, from low to high. When the CPU detects the start of the removal, drive signals from a CCD driver (52) to a CCD (50) is stopped. Then, power supply from a power supply section (62) to the CCD is stopped.