The invention relates to an underground lamp with a cleaning function and intelligent adjustment of working time. The underground lamp comprises a main body, a sealing glass plate and a cleaning mechanism; an LED lamp, a PLC, a transverse plate, a lifting mechanism and two power generation mechanisms are arranged in the main body; the lifting mechanism comprises a cross bar, a driving module, an extension frame, a connecting plate, two first slide blocks, two support plates and two transmission blocks; the power generation mechanisms comprise third motors, first transmission shafts, driving wheels, belts, driven wheels and second transmission shafts; and the cleaning mechanism comprises a second motor, a lead screw, a second slide block, a bearing base, a slide rod, a connecting block anda cleaning block. In the underground lamp with the cleaning function and intelligent adjustment of the working time, through the power generation mechanisms, when the underground lamp works at daytime, the photovoltaic power generation can be performed; at night, the LED lamp can be ascended through the lifting mechanism for illumination to improve the practicability; and through the cleaning mechanism, dust on the sealing glass plate is timely cleaned to improve the cleaning capacity.