The concentration of elements in molten metal of AZ31 magnesium alloy after long pulsed Nd:YAG laser processing was quantitatively analyzed by using calibration-free laser-induced breakdown spectroscopy (CF-LIBS). The composition change in AZ31 magnesium alloy under different laser pulse width was also investigated. The experimental results showed that CF-LIBS can obtain satisfactory quantitative or semi-quantitative results for matrix or major elements, while only qualitative analysis was possible for minor or trace elements. Moreover, it is found that the chemical composition of molten metal will change after laser processing. The concentration of magnesium in molten metal is lower than that present in the base metal. The Mg loss increases with an increase of pulse width in the laser processing. This result shows that the selective vaporization of different elements is affected by the pulse width during laser processing.