The invention belongs to the technical field of physical instruments, and relates to an earthquake early warning system for buildings. A micro-acceleration sensor is fixed in a relevant position on a building; when the building shakes or vibrates, the micro-acceleration sensor also correspondingly shakes or vibrates, and acquired acceleration data of the acceleration sensor is converted into displacement data through a data acquisition terminal; and if the spread of longitudinal waves of earthquakes is monitored, the displacement data is sent to a monitoring master station or an earthquake alarm systems in other place in a text-message transmission way via GSM wireless networks, and then a sound-light alarm system is started. The earthquake early warning system has the advantages of small size, light weight, low cost, low power consumption, long life span, high reliability, wide dynamic range, fast response, convenience for installation and debugging, and the like, and can be established in main regions of China to construct a stereoscopic monitoring system for natural disasters.