The present invention discloses an intelligent pest-killing lamp that attracts, disorients, and ideally kills plant pests, soil insects and sanitary insects, protecting plants and crops. The invention generates light at wavelengths between about 360 nm and about 420 nm with about 365 nm being preferred. The invention can also generates combinations of four colors of light. The light pulses at frequencies ranging from about 250 to about 500 hz, disorienting pests. The invention comprises a screw lamp base, an upper cover, a middle cover, a lamp and a control circuit board. The control circuit board comprises a controller that controls the light pulse frequency and an oscillator that drives the lamp. The screw lamp base is fixed on the upper end of the upper cover, the middle cover is fixed on the lower end of the upper cover, the control circuit board is configured in a space between the upper cover and the middle cover, and two pins on the neck of the lamp run through two holes or hollow cylinders on the lower end of the middle cover with the two pins being attached to the control circuit board.