This paper presents a novel microstrip diplexer constructed by integrating the engraved semi-patch cells. It operates at 1.8 GHz for global system for mobile communication (GSM) and 2.4 GHz for wireless local area network (WLAN). The introduced structure is well miniaturized so that it has a compact size of 0.022 λg2. The others advantages of the proposed diplexer are the low insertion losses less than 0.16 dB, good in-band channel isolation higher than 34 dB and two wide fractional bandwidths. Moreover, 1st, 2nd and 3rd harmonics are attenuated with the maximum level of −20 dB. A harmonic attenuation method is presented based on analyzing the resonance modes. In order to verify the simulation results, the designed diplexer is fabricated and measured. The simulation and measurement results are in a good agreement.