The invention discloses an embedded system capable of upgrading software on line and an online upgrading method. The system comprises an embedded terminal, and a remote master station, a short range master station and a local master station which can respectively transmit data with the embedded terminal, wherein the embedded terminal comprises a master control chip, a program memory, a data memory, a remote communication interface and a local/close communication interface; the program memory of the embedded terminal is divided into a region A and a region B which have equal structures, when the master station transmits a software package to the embedded terminal, a bootstrap process of a system of the embedded terminal is sequentially performed from the region A to the region B in turn, and a bootstrap region is converted when the software of the system is upgraded each time; and double backups of system program are saved in the program memory, and if the upgrading process is failed, the system program can be recovered from a region in which the system program is successfully started last time. By the method, various abnormal situations in the online upgrading process can be effectively identified, and corresponding measures are taken for repair, such as error retransmission, resume from break point, invalid abandon or failure recovery, so that the correctness and robustness of online upgrading can be ensured.