The developed smart coating for water−oil separation, characterized by its mild separation conditions, ease of control, and absence of secondary pollution, holds promising potential for applications in controlled liquid transmission, oil−water separation, smart textiles, and biosensing films. This work focused on synthesizing copolymers that respond to both photon and pH stimuli. Initially, 4-trifluoromethoxy-4′-methacryloxyazobenzene (FMAB) and similar monomers, serving as photon-responsive units with varying carbon chain lengths, were synthesized using different synthetic routes. Such a design approach also aimed to enhance the hydrophobic characteristics of the photoresponsive segments to a certain degree. Theoretically, the impact of the carbonyl position on nucleophilic substitution reactions was investigated through density functional theory (DFT) calculations. These monomers were subsequently copolymerized individually with dimethylaminoethyl methacrylate (DMAEMA), which acts as a pH-responsive unit, using the reversible addition−fragmentation chain transfer (RAFT) technique in a one-step copolymerization process. The polymers were subsequently coated onto glass slides to form films, the contact angles of which could be modulated in response to both light and pH stimuli. To be highlighted, the maximum contact angle change can reach 131°under double stimulation. To ultimately showcase its oil−water separation capabilities, the polymer was combined with a nonwoven fabric to create a membrane. This membrane is capable of reversibly transitioning between hydrophilic−lipophobic and hydrophobic− lipophilic states, demonstrating substantial potential for future advancements in efficient water−oil separation.