A disinfecting and sterilization method, suitable for a portable electronic device having a first body, a second body, a hinge mechanism, a control unit, a sensor unit, a sterilization module and a shielding module, wherein, the hinge mechanism is connected between the second body and the first body, the control unit is disposed in the first body or the second body, the sensor unit is disposed in the first body or the second body and coupled to the control unit, the sterilization module is disposed in the hinge mechanism and coupled to the control unit, the shielding module is disposed on the hinge mechanism and movable relative to the hinge mechanism, and the shielding module is coupled to the control unit, the disinfecting and sterilization method comprising:
- detecting that the first body and the second body are closed relative to each other by the sensor unit;
- activating the sterilization module and generating at least one light for sterilization and disinfection by the control unit;
- driving the shielding module to move to a first position by the control unit, enabling at least one optical path of the sterilization module to pass through at least one light-passable opening of the shielding module;
- and
- shutting down the sterilization module and driving the shielding module to move to a second position by the control unit, so as to block the at least one optical path of the sterilization module.