In order to solve the family anti-theft problem and complete the alarm function of the residence, a family anti-theft alarm system based on STC89C51 microcontroller is designed.The infrared spectrum signal is detected by pyroelectric infrared detector in the residential or key areas.This design is divided into hardware and software, which consists of signal detection circuit, LED lamp and buzzer execution circuit, GSM module and the basic peripheral circuit of the single-chip microcomputer system to form the hardware system, and software by interrupt, timing and other subroutine to control the relevant hardware module to complete the alarm function.The experimental results show that the system can detect illegal intrusion and warn relevant personnel in time, which can effectively guarantee the safety of person and property.