Microscale patterning of colloidal perovskite nanocrystals (NCs) is essential for their integration in advanced device platforms, such as high-definition displays. However, perovskite NCs usually show degraded optical and/or electrical properties after patterning with existing approaches, posing a critical challenge for their optoelectronic applications. Here we achieve nondestructive, direct optical patterning of perovskite NCs with rationally designed carbene-based cross-linkers and demonstrate their applications in high-performance lightemitting diodes. We reveal that both the photochemical properties and the electronic structures of cross-linkers need to be carefully tailored to the material properties of perovskite NCs. This method produces high-resolution (∼4000 ppi) NC patterns with preserved photoluminescent quantum efficiencies and charge transport properties. Prototype light-emitting diodes with patterned/cross-linked NC layers show a maximum luminance of over 60000 cd m −2 and a peak external quantum efficiency of 16%, among the highest for patterned perovskite electroluminescent devices. Such a material-adapted patterning method enabled by designs from a photochemistry perspective could foster the applications of perovskite NCs in system-level electronic and optoelectronic devices.