A new kind of biamphiphilic ionic liquid (BAIL) consisting of 1-dodecyl-3-methylimidazolium (C12mim(+)) and dodecyl sulfonate (DSN(-)) has been synthesized and characterized for the investigation on its self-assembling behavior with β-CD in the aqueous medium. Vesicles were found in the diluted C12mimDSN@3β-CD solution, and on increasing the concentrations of both IL and β-CD, the solution turned into a white hydrogel, which showed a temperature-dependent sol-gel transition. The building block consisting of one C12mimDSN and three β-CDs was proposed, and a novel self-assembly mechanism was studied. Both cation and anion of the BAIL are involved in the self-assembling with β-CD. The electronic interaction between C12mim(+) and DSN(-), the hydrophobic interaction between the alkyl chains of BAIL and β-CD cavity, H-bond between neighboring β-CDs, and the interaction between imidazolium headgroup and water in the hydrogel are the driving force for the self-assembly.