We report on rotaxanes featuring a pyridyl-acyl hydrazone moiety on the axle as a photo-/thermalswitchable macrocycle binding site. The pyridyl-acyl E-hydrazone acts as a hydrogen bonding template that directs the
assembly of a benzylic amide macrocycle around the axle to form rotaxanes in up to 85 % yield; the corresponding Zhydrazone thread affords no rotaxane under similar conditions. However, the E-rotaxane can be smoothly converted into the Z-rotaxane in 98 % yield under UV irradiation. The X-ray crystal structures of the E- and Z-rotaxanes show different intercomponent hydrogen bonding patterns. In molecular shuttles containing pyridyl-acyl hydrazone and succinic amide ester binding sites, the change of position of the macrocycle on the thread can be achieved through a series of light irradiation
and heating cycles with excellent positional integrity (>95 %) and switching fidelity (98 %) in each state.