An optimal design method of reliability for soil nailed walls is proposed. This method can ensure the safety of the soil nailed wall in excavation and operation,such as:(1) there is enough bearing capacity of the nail head for each excavation stage and in operation,and the yield strength of the steel bar for the nail is not exceeded,(2) there is sufficient safety factor of the slope stability of soil nailed wall for each excavation stage,and (3) an optimal design method based on iteration process is adopted that the most economic design of the soil length and steel bar diameter are achieved. This method incorporates the dynamic relationship between the location of the slip surface,the nail length and the diameter of the steel bar in each excavation stage and operation. The method is applied to a case record for illustration of its capability. The case record involves a failed soil nailed wall in the loess deposit in China. The cause of failure was analyzed,which reveals some deficiency of the existing method of design which doesn¢t consider dynamic relationship between the location of the slip surface,the nail length and the diameter of the steel bar and the stability in each excavation stage. The wall is redesigned based on the proposed method and has been constructed successfully. The proposed method can be a useful reference for engineers in design and construction of the soil nailed wall.