Guest-induced self-assembly of a macrocyclic boronic ester containing photochromic diarylethene units is realized and this macrocycle showed high quantum yield of photoisomerization due to favourable conformational constraint.