Optogenetics has emerged as a powerful tool for spatiotemporal control of biological processes. Near-infrared (NIR) light, with its low phototoxicity and deep tissue penetration, holds particular promise. However, the optogenetic control of polypeptide bond formation has not yet been developed. In this study, we introduce a NIR optogenetic module for conditional protein splicing (CPS) based on the gp41-1 intein. We optimized the module to minimize background signals in the darkness and to maximize the contrast between light and dark conditions. Next, we engineered a NIR CPS gene expression system based on the protein ligation of a transcription factor. We applied the NIR CPS for light-triggered protein cleavage to activate gasdermin D, a pore-forming protein that induces pyroptotic cell death. Our NIR CPS optogenetic module represents a promising tool for controlling molecular processes through covalent protein linkage and cleavage.