Forming the quaternary salt
A quaternary ammonium salt is produced when a tertiary amine undergoes nucleophilic substitution with a halogenoalkane. The nitrogen lone pair attacks the carbon bonded to the halogen and forms a new carbon–nitrogen bond.
Unlike the reactions that form primary, secondary and tertiary amines, only the nucleophilic-attack stage is needed. The product has no N–H bond, so there is no proton-removal step.
Using an excess of halogenoalkane promotes continued substitution and therefore favours formation of the quaternary ammonium salt.
Structure
The nitrogen atom in a quaternary ammonium ion is bonded to four alkyl groups and carries a positive charge. The four carbon groups may be identical or different.
A negatively charged ion, such as a halide ion, is present as the counter-ion, so the overall substance is a salt.
Quaternary ammonium salts are not amines: the nitrogen already has four carbon-containing groups bonded to it and carries a permanent positive charge.
General structure of a quaternary ammonium salt.
For example, a tertiary amine can react with a halogenoalkane to produce a tetraalkylammonium salt: