Six kinds of phosphate and phosphonate ionic liquids were used as lubricants for three different alloys. The physicochemical properties and solid-liquid interaction were studied and associated with tribological performances, and some rules were revealed. Specifically, the lubricating properties were dominated by the cations and the ammonium and phosphonium ionic liquids showed better lubricating properties than the imidazolium ionic liquids containing the same anions when lubricate steel/Al alloy. For steel/Cu alloy, an empirical rule is obtained that the lower viscosity and poorer wetting properties the ionic liquids exhibit led to the lower friction coefficient, but the wear volume was mainly determined by the corrosion property. For steel/Mg alloy, the tribological performances are significantly influenced by the structures of the ionic liquids.