We apply the dynamic differential evolution (DDE) algorithm to solve the inverse scattering problem for which a two-dimensional perfectly conducting cylinder with unknown cross section is buried in a dielectric slab medium. The finite-difference time domain method is used to solve the scattering electromagnetic wave of a perfectly conducting cylinder. The inverse problem is resolved by an optimization approach, and the global searching scheme DDE is then employed to search the parameter space. By properly processing the scattered field, some electromagnetic properties can be reconstructed. One is the location of the conducting cylinder, the others is the shape of the perfectly conducting cylinder. This method is tested by several numerical examples, and it is found that the performance of the DDE is robust for reconstructing the perfectly conducting cylinder. Numerical simulations show that even when the measured scattered fields are contaminated with Gaussian noise, the quality of the reconstructed results obtained by the DDE algorithm is very good.