Images printed by laser marking systems will be distorted if linear voltages are given to the galvanometers due to the nonlinear relationship between angles of the galvanometers and coordinates of the image field. This paper presents a novel algorithm for correction of the distortion. A grid that covers the whole range of the image field is printed. The expected positions of the intersected points of the grid are calculated, and linear input voltages of the galvanometers are given to the laser marking system for printing the grid. Without distortion, the grid would be expected to be composed of vertical and horizontal lines. As a matter of fact, the printed lines will be curves. The intersected points of the curves are measured too. As any point to be printed will be in one of the quadrangles of the distorted grid, the corresponding corrected voltages of the galvanometers are calculated by linear interpolation according to the vertices of the quadrangle and their voltage inputs. Using the corrected voltages for printing, the distortion will be corrected. It is proved reliable by simulation and experiments on the laser marking system.