In this paper, the microstructures with extreme properties are designed through the generalized shape optimization, which is implemented with the help of the smooth curves representation of the level set description and the numerical analyses of the eXtended Finite Element Method (X-FEM) with the fixed mesh work. The parameters of basic level set features are defined as the design variables. To calculate the given effective computation of microstructures, the energy method and homogenization method are physically identical. But the energy method is advantageous in computing efficiency and numerical implementation. Combining with the CONLIN algorithm, the periodic microstructures with the maximum elastic properties are obtained with the flexibility of handling the topological changes and solid-void boundaries. Numerical examples show the great interests in the microstructure design with the level set method and X-FEM.