For practical application, the functional piezoelectric film in microelectromechanical systems should meet the requirement of physical properties, as well as the mechanical properties. In this article, 0.5Ba(Ti0.8Zr0.2)O3–0.5(Ba0.7Ca0.3)TiO3 (0.5BZT–0.5BCT) thin films with varied properties were prepared on (100) Si substrates via a sol–gel technique at different annealing temperatures. The effects of the annealing temperature on the morphology, piezoelectricity, hardness, and elastic modulus were studied. Particular attention was paid to the surface frictional behavior of films, and the changes in the friction force can be radically explained in terms of differences in the hardness/elastic modulus ratio and the residual stress of films. And, it reveals that the higher ratio of hardness to elastic modulus and tensile residual stress can contribute to a lower friction force for 0.5BZT–0.5BCT film during sling friction.