The liquid crystal nonsymmetric dimer, 1-(4-butoxyazobenzene-4'-yloxy)-6-(4-cyanobiphenyl-4'-yl) hexane (CB6OABOBu), shows enantiotropic twist-bend nematic, NTB, and nematic, N, phases. The NTB phase has been confirmed using polarized light microscopy, freeze fracture transmission electron microscopy, and X-ray diffraction. The helicoidal pitch in the NTB phase is 18 nm. The NTB-N (TNTBN) and N-I (TNI) transition temperatures are reduced upon UV light irradiation, with the reduction in TNTBN being much larger than that in TNI. An isothermal, reversible NTB-N transition may be driven photochemically. These observations are attributed to a trans-cis photoisomerization of the azobenzene fragment on UV irradiation, with the cis isomers stabilizing the standard nematic phase and the trans isomers stabilizing the NTB phase. The dramatic changes in TNTBN provide evidence that the transition between the normal nematic and twist-bend nematic with spontaneous breaking of chiral symmetry is crucially dependent on the shape of molecular dimers, which changes greatly during the trans-cis isomerization.