With the increasing demand for information security, traditional single-factor authentication technology can no longer meet security requirements. To this end, this paper proposes a Universal Serial Bus (USB) Key hardware and software system based on a two-factor authentication protocol, aiming to improve the security and reliability of authentication. This paper first analyzes the current status and technical principles of USB Key-related research domestically and internationally and designs a two-factor authentication protocol that combines impact/response authentication and static password authentication. The system consists of a host computer and a USB Key device. The host computer interacts with the USB Key through a graphical user interface. The Secure Hash Algorithm 1 (SHA-1) and MySQL database are used to implement the authentication function. Experimental results show that the designed two-factor authentication protocol can effectively prevent replay attacks and information tampering, and improve the security of authentication. If the corresponding USB Key is not inserted, the system will prompt that the device is not found. Once the USB Key is inserted, user identity is confirmed through two-factor verification, which includes impact/response authentication and static password authentication.