A technique to fabricate GaAs/AlGaAs first-order gratings using electron beam (EB) lithography and its application to long-cavity distributed Bragg reflector (DBR) laser diodes is presented. The field stitching error, which limits the application of EB lithography to optical devices, was reduced to 5 nm by deflection amplitude calibration using marks on the samples. In addition, we have proposed a novel technique to control the coupling coefficient using partially corrugated gratings. These techniques were applied to fabrication of GaAs/AlGaAs first-order gratings of GRIN-SCH-SQW DBR laser diodes. The resulting stitching error did not influence the single-mode lasing characteristics, and a very narrow linewidth of 237 kHz was achieved. The results show that EB lithography with these techniques is useful in the fabrication of various optical devices with gratings.