This paper presents a method to improve the alignment accuracy of a mask in linear scale projection lithography, in which the adjacent pixel gray square variance method is applied to a charge-coupled device (CCD) image to obtain the best position of the focal length of the motherboard and then realize the alignment of the focal plane. Two image positions in the focal plane of the CCD are compared with the traits overlap according to the image splicing principle, and four typical errors are corrected on the basis of the total grating errors. Simultaneously, the rotation error of the mask is used to summarize the grayscale variation function of the CCD image. Threshold functions are employed to express the factors including the wave crests of the amplitude, period error, and phase error, which govern the rotation accuracy and weight alignment accuracy expression of the established four error factors. Finally, in the experiment, the slope of the mask is corrected and adjusted to the same direction as the slide plate with the assistance of a dual-frequency laser interferometer. The effect of the alignment error on the lithography accuracy is discussed and verified in the static case, and it is found that the CCD maximum resolution pixel is 0.1 μm and accuracy of the scale is 0.79 μm in only a 200-mm-measurement range.