Aiming at achieving metamaterials (MTM)-based enhanced transmission through the sub-wavelength aperture on a metallic isolating plate in specific frequency band, the topology optimization method for MTM microstructure design was proposed. The MTM was inserted in the sub-wavelength aperture and perpendicular to the isolating plate. A piecewise preset function was employed to describe the expected enhanced and non-enhanced transmission frequency band. The transmission coefficient of the waveguide system with the designed MTM was mapped to a step mapping function. In the topology optimization of the MTM configuration, matching the mapping function to the preset function was chosen as the design objective. Three designs aiming at different specific enhanced transmission frequency band were carried out. The design satisfied the demand for the specific enhanced transmission frequency band, which was also validated by experiment.