Intensity of the charge exchange recombination spectrum and the beam emission spectrum on the HL-2A tokamak were obtained by numerical simulation method, and the plasma impurity concentrations were obtained by the ratio of these two spectra. The simulation was to validate the possibility and reliability of the method. A three-grating spectrometer system was used in the experiment. Using the same line of sights, simultaneous measurement of carbon (C VI), helium (He II) charge exchange recombination spectrum and neutral beam emission spectrum were obtained for the first time on HL-2A. Absolute concentration profile of C6+ and He2+ ions were obtained synchronously on HL-2A for the first time. The method uses relative intensity calibration instead of complex absolute intensity calibration and avoids neutral beam attenuation calculations.