The invention discloses a method and a system for locking an SIM (subscriber identity module) card by utilizing hardware. The method comprises the following steps that when equipment starts for the first time, an identification ID of an NAND memory and a country code and a network code of a PLMN (public land mobile network) corresponding to a preset SIM card are read, a safe key is figured out through the operation of the identification ID, the country code and the network code, and the safe key is stored; when the equipment leaves the factory and starts normally after the SIM card is inserted into the equipment, a new key is figured out through the operation of the country code and the network code of the PLMN corresponding to the current SIM card, and the identification ID; the new key is compared with the safe key, if the new key is consistent with the safe key, the equipment is used normally; and if not, the network function is disabled. According to the method and the system for locking the SIM card by utilizing hardware, on the basis of not increasing a chip, the identification ID of the NAND memory of the current system is matched with the SIM card in a software mode, so that the safety on locking the SIM card with hardware is realized. The problem that the traditional software-only SIM card locking is not high in safety, and the cost is increased as a hardware chip is arranged is avoided. The requirements of network operators on locking SIM cards are well met.