The host-guest interaction based on thiol-β-cyclodextrin and a symmetric compound containing two azobenzene units on ends has been utilized to form end-to-end assembly of gold nanorods. Both UV light irradiation and guest competition can be used to transform the GNR alignments in a disassembled manner.