The invention relates to a railway early warning system and an early warning method based on mobile communication. The railway early warning system comprises at least one main device and at least one slave device, wherein the main device is mounted on a locomotive head; the slave device is a portable mobile device; the main device comprises a power supply, a central processing unit, a keyboard, a display unit, an alarming unit and a point-to-point wireless communication unit, wherein the keyboard, the display unit, the alarming unit and the point-to-point wireless communication unit are respectively connected with the central processing unit; the slave device comprises a rechargeable battery, a central processing unit, a keyboard, a microphone, a display unit, a alarming unit and a point-to-point wireless communication unit, wherein the keyboard, the microphone, the display unit, the alarming unit and the point-to-point wireless communication unit are respectively connected with the central processing unit; and the point-to-point wireless communication unit of the main device and the point-to-point wireless communication unit of the slave device form a point-to-point wireless communication system. The invention solves the technical problem that the traditional railway early warning system only can be used for static fixed occasions. The invention can effectively prevent the occurrences of events, achieve random, automatic and fast early warning, and immediately stop or minimize the possible accidents.