An add-drop filter based on a perfect square resonator can realize a maximum of only 25% power dropping because the confined modes are standing-wave modes. By means of mode coupling between two modes with inverse symmetry properties, a traveling-wave-like filtering response is obtained in a two-dimensional single square cavity filter with cut or circular corners by finite-difference time-domain simulation. The optimized deformation parameters for an add-drop filter can be accurately predicted as the overlapping point of the two coupling modes in an isolated deformed square cavity. More than 80% power dropping can be obtained in a deformed square cavity filter with a side length of 3.01 microm. The free spectral region is decided by the mode spacing between modes, with the sum of the mode indices differing by 1.