A very thin (50‐Å) epitaxial In0.2Ga0.8As layer is used as a Cl2 etching mask for in situ electron‐beam (EB) induced GaAs/AlGaAs patterning. Simultaneous EB/Cl2 exposure makes the In0.2Ga0.8As mask layer resistant to Cl2 etching, while the parts of the mask only exposed to Cl2 are easily etched off, resulting in negative‐type pattern formation. The resistance of the EB/Cl2‐exposed area depends on the In content in the InGaAs mask. Possible causes of this are discussed. Using this patterning technique, a GaAs/AlGaAs quantum well is fabricated into a dot‐matrix pattern and the pattern is characterized by a cathodoluminescence measurement.