The invention discloses a key ultraviolet sterilization system and a working method. The key ultraviolet sterilization system comprises a key sterilization device and a control device, wherein the keysterilization device comprises a key seat, a key, a reset spring, a distance sensor and a light shielding plate; the control device comprises a sterilization seat, a sliding block, a driving device,a linkage mechanism and a controller; a sliding groove is formed in a side surface of the sliding block and comprises a first sliding groove, a buffer groove, a second sliding groove and a reset groove; an elastic sheet is arranged at the joint of the first sliding groove and the buffer groove on the sliding block; the middle of the elastic sheet protrudes towards the rear end of the sliding blockto form an arc; and the linkage mechanism comprises a driving rod, a fixing pin, a fixing rod, a connecting pin, a spring, a fixing block and a trigger switch, and further comprises a human body sensor. According to the working method, when the key is pressed by a hand, an ultraviolet sterilization lamp does not work, otherwise, the ultraviolet sterilization lamp works, and light shielding is carried out by utilizing the light shielding plate. According to the key ultraviolet sterilization system and the working method, the key can be pressed, the key can be sterilized after pressing is completed, and no harm is caused to a human body.