Decomposition during XPS measurements of a perfluoropolyether (PFPE) lubricant applied to a gold film has been studied by XPS and mass spectrometry. The decomposition is probably initiated inside the sample either by X-ray photons or secondary electrons created by the photoelectric effect, or by both. The desorption patterns and XPS spectra show that the decomposition behavior for X-ray irradiation is similar to that for electron bombardment. According to XPS results, under X-ray exposure the -O-CF2-O- unit is the most fragile part in the polymer. Both the X-ray-induced and the electron-induced desorption spectra reveal that OCF2, CO2 and C2F6 are the primary gas products. A flurocarbonaceous layer with little oxygen content is formed on the gold film surface after X-ray irradiation. The fluorocarbonaceous layer is composed of a straight-chain structure and a cross-linked structure, and probably contains conjugated carbons.