An inversion method for electromagnetic scattering echo data from large-scale layered medium is presented to simultaneously retrieve the electromagnetic property parameters of the medium. Firstly, the inversion is converted into an optimization problem. Then the simulating annealing algorithm is adopted to find the optimal solution by taking full advantage of the algorithm global optimization. Besides, the search control strategy of the algorithm is optimized so that the algorithm can adaptively adjust the search step in the optimal solution search process. The search efficiency of the algorithm is improved by these optimizations. Results show that the proposed method can achieve an accurate result in the inversion of the characteristic parameters of large-scale layered media as well as a strong anti-noise ability. The inversion method presented can be applied to the Mars/lunar radar echo data inversion and analysis of underground layered medium.