LEGS is a Load-balancing Emergency Guiding System using a wireless sensor network. In LEGS, we design a load-balancing guiding scheme and derive an analytical model in order to reduce the total evacuation time of people. The proposed guiding scheme can provide the fastest path to an exit based on the evacuation time estimated by the derived analytical model. To the best of our knowledge, LEGS is the first system which takes the corridor capacity and length, exit capacity, and people distribution into consideration for analyzing evacuation time and planning escape paths. Through LEGS, the congestion of certain corridors and exits can be released to significantly reduce the evacuation time of people. Analytical and simulation results show that LEGS outperforms existing works, which can prevent people from following the local optimal guiding direction with the longer evacuation time in total. LEGS thus demonstrates an efficient emergency guiding system for public safety.