The X-ray crystal structure of 1,12-dodecane diammonium (C12DA2+) encapsulated in cucurbit[8]uril reveals an unconventional U-shaped conformation of C12DA2+, which is attributed to the favorable host–guest interactions to overcome the charge–charge repulsion of the two ammonium groups in close proximity and high internal strain.