The structure of N,N-dimethylaminobenzonitrile (DMABN) was determined using microwave and high-resolution laser spectroscopy. In the ground state, the molecule is found to be nearly planar with the inversion angle being about 15-degrees. In the excited state, however, the dimethylamino group rotates by 30-degrees from the benzene plane while the inversion angle is zero. The structure of 1:1 DMABN-Ar and 1:1 DMABN-H2O complexes was also estimated using high-resolution spectra. The Ar atom was found to lie above the benzene ring whereas the water molecule is located within the benzene plane, about 3.5 angstrom to the side of the CN group.