A newly developed, ion exchange-based inline pretreatment system was used to mitigate the effect of background constituents in natural water and treated wastewater to achieve rapid, reliable, and sensitive analysis of N-nitrosamines. The pretreatment system (anion exchange module, AEM) was incorporated into a high-performance liquid chromatograph (HPLC) coupled with a photochemical reactor (PR) and chemiluminescence (CL) detector (HPLC-PR-CL), which can analyze four hydrophilic N-nitrosamines at ng/L levels. This system requires no pre-concentration of the water sample nor the use of deuterated surrogates, unlike other conventional N-nitrosamine analytical techniques. The AEM converted anions in the eluent to hydroxide ions after HPLC separation and increased eluent pH, allowing for the subsequent photochemical reactions, which are otherwise achieved by pH conditioning with an additional dosing pump of basic chemical. The AEM also removed anionic interfering compounds (e.g. nitrate) from the samples, allowing for improved N-nitrosamine analysis in treated wastewater. The operating conditions of the AEM and PR were optimized to obtain sensitive and stable analytical performance. As a result, the lowest-concentration minimum reporting levels of N-nitrosodimethylamine, N-nitrosomorpholine, N-nitrosomethylethylamine, and N- nitrosopyrrolidine using the optimized system were 0.42, 0.54, 0.58, and 1.4 ng/L, respectively. The improved analytical method was validated by comparing the results with a conventional method based on gas chromatography coupled with a mass spectrometric ion trap detector. These results indicated that HPLC-PR-CL equipped with an inline AEM can be competitively applied as a rapid analytical technique for the determination of N-nitrosamines in various water matrices.