The identification of impurities in l-carnitine by mass spectrometry is difficult because derivative reagents or ion pair reagents are usually used to separate and increase the retention of l-carnitine on the reversed-phase column. In this study, four impurities including 3-chloro-2-hydroxy-N,N,N-trimethylpropan-1-aminium, 3-cyano-2-hydroxy-N,N,N-trimethylpropan-1-aminium, 3-carboxy-N,N,N-trimethylprop-2-en-1-aminium, and 4-chloro-2,3,4-trihydroxy-N,N,N-trimethylbutan-1-aminium were identified in l-carnitine and its tablets by using two-dimensional column-switching high-performance liquid chromatography coupled with linear ion trap mass spectrometry. The first column was a C column at a flow rate of 0.15 mL/min; the detection wavelength was 220 nm. The second column was an Acclaim Q1 column using a gradient elution program with aqueous 30 mM ammonium acetate (pH 5.0) and acetonitrile as the mobile phase at a flow rate of 0.5 mL/min. The mass fragmentation patterns and structural assignments of impurities were studied, and the quantitative validation of three impurities was further investigated. The linearity (r ) was found to be >0.99, with ranges from 0.2 to 50 ng/mL and 0.1 to 10 ng/mL. The method was used successfully for determination of impurities in five samples of l-carnitine and tablets.