The paper introduces a new way for the termination of periodic waveguides using integral equation like simulation techniques. Exploiting the complex coordinate interpretation of a perfectly matched layer (PML), we can terminate a periodic waveguide by adding a couple of periods in the complex plane. If the waveguide enters the complex plane in a smooth way, the reflections caused by the periodicity disturbance are very low and, at the same time, one achieves a significant absorption. This idea is applied to a two-dimensional electromagnetic crystal waveguide structure. The validity of our approach is demonstrated by comparison with a rigorous method based on the exact calculation of the excitation coefficients of the eigenmodes in the waveguide and by comparison with a more complex example (a two-channel multiplexer-demultiplexer) from the literature.