Hydrogen bonds (H-bonds) formed between nucleobases play an important role in the construction of various nucleic acid structures. The H-donor and H-acceptor pattern of a nucleobase is responsible for selective and correct base pair formation. Herein, we describe an 8-thioadenine nucleobase analogue and an 8-thiohypoxanthine nucleobase analogue with a photolabile 6-nitroveratryl (NV) group on the sulfur atom (SA(NV) and SH(NV), respectively). Light-triggered removal of the NV group causes tautomerization and a change in the H-bonding pattern of SA(NV) and SH(NV). This change in the H-bonding pattern has a strong effect on base recognition by 8-thiopurine nucleobase analogues. In particular, base recognition by SH(NV) is clearly shifted from guanine to adenine upon photoirradiation. These results show that a photoinduced change in the H-bonding pattern is a unique strategy for manipulating nucleic acid assembly with spatiotemporal control.