X-ray fluorescence remote sensing technique plays a significant role in the chemical compositions research of the Moon. Here we describe the data analysis method for China's Chang'E-2 X-ray spectrometer (CE2XRS) in detail and present the preliminary results: the first global Mg/Si and Al/Si maps on the lunar surface. Our results show that the distributions of Mg/Si and Al/Si correlate well with the terrains of the Moon. The higher Mg/Si ratio corresponding to the mare regions while the lower value corresponding to the highland terrains. The map of Al/Si ratio shows a reverse relationship with the map of Mg/Si ratio.