The invention discloses a method and system for automatic focusing of a laser projector. The method includes S1, the laser projector projecting at least one light beam into space; S2, a collecting module collecting light spot images in real time; S3, a recognizing module recognizing the laser light spots according to second derivative of distribution of the light spot strength; S4, a computation module computing parameter values of definition of the light spot images; S5, a focusing module focusing relative relation of a light source constantly and repeating the step 1-4; S5, the focusing module comparing the parameter values acquired in real time to acquire the optimum parameter value, and focusing the light source to the optimum position according to the optimum parameter value. With the method and the system, automatic focusing of the laser projector can be realized, the problem of low precision brought by manual focusing in the prior art is solved, and meanwhile, focusing efficiency is greatly improved.