The invention discloses a solar street lamp with a deinsectization function for gardens, and belongs to the technical field of solar street lamps. The solar street lamp comprises a lamp post, a positioning mechanism is arranged in the lamp post, lamp poles are fixedly connected to the left and right side surfaces of the lamp post, one end of each lamp pole is fixedly connected with one end of thepositioning mechanism, and the other end of each lamp pole is fixedly connected with a fixing rod. According to the invention, an insect trapping lamp is arranged and can trap winged insects to enablethe winged insects to get close to an insect sticking mechanism, the insect sticking mechanism and a scraping rod are arranged, an insect sticking film is coated with a large amount of mucilage glue,the mucilage glue can effectively stick the winged insects, and if a large amount of winged insects stick to the insect sticking film and the insect sticking film cannot continue to stick, a motor iscontrolled to work to drive a first gear to rotate, the first gear drives a second gear to rotate, a sponge mat adsorbs the glue solution and overflows, the glue solution can be evenly smeared on theouter side of the insect sticking film, at the moment, the insect sticking film is updated, winged insects can continue to be stuck, treatment on the winged insects cannot be affected, and the influence of the winged insects on the street lamp is reduced.