The nontargeted scanning chemical profiling approach has shown great potential to identify unknown pollutants or novel biological markers; however, the structure identification of unknown compounds is a challenge. In this study, a carboxyl-specific derivatization reagent, N-(4-aminomethylphenyl) pyridinium (AMPP), was coupled with QTOF-MSE-MS scanning to establish a high-throughput nontargeted scanning method for acid compounds. The scanning method can isolate the precursor by data-independent acquisition and can select all of the acid compounds based on the characteristic fragment generated from the derivatization reagent. The method was applied to scan naphthenic acid fraction compounds in petroleum refinery wastewater and identify 70-126 NAs, 30-68 oxy-NAs, 54-60 NAs containing nitrogen, and 66-75 NAs containing both nitrogen and oxygen. Chlorinated NAs (Cl-NAs) including monochlorinated NAs (Cl-NAs), monochlorinated hydroxylated NAs (Cl-OH-NAs), and dichlorinated dihydroxylated NAs (Cl2-(OH)2-NAs) were first identified with the aid of chlorine isotopic patterns. The Cl-NAs might be naturally presented in crude oil together with NAs. Occurrences and mass balances of Cl-NAs were further assessed in the wastewater treatment plant in north China. The total concentrations of ∑Cl-NAs were estimated to be 12 ± 7.8-18 ± 17 μg/L and 8.5 ± 2.0-68 ± 35 μg/g in the wastewater and solid samples, respectively. The removal efficiencies of Cl-NAs (-29.9 to 34.3%) were much lower than those of NAs, suggesting the high recalcitrance of chlorinated compounds during the treatment processes. The estimated mass loss fractions due to degradation for Cl-NAs were 26.5-53.4% of initial loadings, and relatively high fractions (32.1-56.8%) were observed in the effluent directly discharged to the environment. Advanced treatment techniques are needed to effectively reduce the persistent Cl-NAs in the wastewater.