Localization of light is usually achieved by external mechanisms, such as metallic reflection, photonic bandgap, and total internal reflections. Here, we propose a new concept about localization of electromagnetic waves, named self-trapped state. We design an ordinary photonic crystal waveguide with two array rods made of magneto-optical media on its two sides. The waveguide modes form a self-trapped band in which electromagnetic waves are trapped. The trapping does not rely on the external mechanisms; instead, it comes from band's own properties. Based on the self-trapped band, the virtual reflection walls and semi-opening cavity can be achieved. The semi-opening cavity has some unique advantages compared with ordinary cavities, e.g., electromagnetic field in it can be either trapped or released; its position and the field amplification in it are tunable. Our study opens a new research door for the combining of magneto-optical materials and photonic crystals.