A CrN coating was deposited on the piston pin material 20CrMo. The tribological properties of 20CrMo and CrN coating against tin bronze QSn7-0.2 were compared by pin-on-disk tests under dry friction and oil lubrication, respectively. The cross-sectional morphologies and structures of the coating were characterized through scanning electron microscopy and X-ray diffraction. The hardness, elastic modulus, and adhesion strength of the coating were tested through nano-hardness and scratch tests. The wear tracks were tested with an optical profilometer, and wear volume was calculated. Under dry friction conditions, the CrN coating exhibited a significantly stable friction coefficient and a relatively lower wear rate against QSn7-0.2 at various temperatures compared with 20CrMo. The wear rate decreased by 98.5% at 700 degrees C. Under poly-alpha-olefine lubrication, the CrN coating reduced the load effect on the friction coefficient. Under engine oil 5W40 lubrication, the CrN coating improved the tribological properties under high speed and heavy load conditions. Simultaneously, the CrN coating changed the friction and heat flow with increasing temperature.