Chlorine disinfection of secondary wastewater effluent and drinking water can result in the production of the potent carcinogen N-nitrosodimethylamine (NDMA) at concentrations of approximately 100 and 10 parts per trillion (ng/L), respectively. Laboratory experiments with potential NDMA precursors indicate that NDMA formation can form during the chlorination of dimethylamine and other secondary amines. The formation of NDMA during chlorination may involve the slow formation of 1,1-dimethylhydrazine by the reaction of monochloramine and dimethylamine followed by its rapid oxidation to NDMA and other products including dimethylcyanamide and dimethylformamide. Other pathways also lead to NDMA formation during chlorination such as the reaction of sodium hypochlorite with dimethylamine. However, the rate of NDMA formation is approximately an order of magnitude slower than that observed when monochloramine reacts with dimethylamine. The reaction exhibits a strong pH dependence due to competing reactions. It may be possible to reduce NDMA formation during chlorination by removing ammonia prior to chlorination, by breakpoint chlorination, or by avoidance of the use of monochloramine for drinking water disinfection.