The molecular behavior of room-temperature ionic liquids (RTILs) under lubricating condition was analyzed using fourier transform infrared spectroscopy equipped with a pin-on-disk tribometer to simultaneously measure the friction force, normal load, and IR spectrum. When 1-metyl-3-butylimidazolium trifluoromethanesulfonate ([BMIM]OTf), which is miscible with water, was used as a lubricant, the water content increased with time, and the ratio of water to cation remained constant even though the film thickness reduced under the lubricating condition at a load of ~25 N. When 1-metyl-3-butylimidazolium tetrafluorophosphate ([BMIM]PF6), which is water-insoluble, was used as a lubricant, the water content was quite small and increased slightly with time, and the ratio of water to cation also remained constant even when a normal load of ~25 N was applied. The SUJ2 pin surface showed oxidative discoloration after the friction test using [BMIM]OTf, but there was little change in color when[BMIM]PF6 was used. XPS results indicated that iron oxide, chromium oxide and sulfate were observed on the worn pin surface using [BMIM]OTf and the CaF2 disk. However, iron oxide and iron phosphate were observed for the worn pin surface using [BMIM]PF6 and the CaF2 disk. These results suggest that the amount of water contained in the RTILs as well as window materials have a significant effect on the tribo-chemical reaction of RTILs.