Metal−organic frameworks (MOFs) are a class of porous materials constructed from organic linkers and inorganic building blocks. Coordinative competition labilizes some MOFs under harsh chemical conditions because of their weak bonding. However, instability is not always a negative property of a material. In this study, we demonstrated the use of the acidic lability of MOFs for direct optical patterning. The controllable acid release from the photoacid generator at the exposed area causes bond cleavage between the linkers and metal ions/clusters, leading to solubility changes and pattern formation after development. This process avoids redundant steps and possible contamination in traditional photolithography, while maintaining the original properties of patterned MOFs. The preserved porosity and crystallinity promoted the development of MOFs for gas sensors and solid displays.