The invention discloses a method for preparing a two-dimensional photonic crystal structure GaN (gallium nitride) based LED (light emitting diode). The method comprises: firstly, spinning a layer of ultraviolet optical resist on a target; copying the two-dimensional photonic crystal structure of a template to the surface of the optical resist by utilizing ultraviolet soft nanoimprinting, and etching to remove the residual resist; evaporating a layer of SiO2 or Cr film on a photonic crystal ultraviolet resist, thus a photonic crystal image is obtained on a target sheet through etching; and theobtained GaN is subjected to removing of photoresist, cleaning and drying, thus a photonic crystal target sheet is obtained, and carrying out subsequent process treatment on the obtained target sheet, thus the manufacturing of a device is finished, and the photonic crystal GaN based LED with high light extracting efficiency is obtained. Through the method provided by the invention, the selection ratio of etching can be improved, the duty ratio of the photonic crystal can be regulated in a certain range, the uneven problem of the surface of the LED chip can be overcome, the photonic crystal image can be prepared better through the nanoimprinting technology, and the method is suitable for the preparation of the GaN based photonic crystal LED in industrial production.