The topology optimization of the internal structure of a simple expansion chamber muffler is realized by using two-dimensional finite element and combined with a gradient-based optimization algorithm,the method of moving asymptotes. Then,on the basis of topology optimization,the size optimization is further studied. The change of the expansion chamber’s internal structure causes the change of transmission loss. United COMSOL with MATLAB programming,numerical results show that on the target wave number,the acoustical performance of the optimized muffler is much better than that of a simple expansion chamber muffler.