The discovery of ferroelectricity in thin films based on HfO2 has garnered increasing attention worldwide, primarily due to their remarkable compatibility with silicon and scalability, in contrast to traditional perovskite-structured ferroelectric materials. Nonetheless, significant challenges remain in their widespread commercial utilization, particularly concerning their notable wake-up effect and limited endurance. To address these challenges, we propose a novel strategy involving the inhomogeneous distribution of Hf/Zr elements within the thin films and explore its effects on the ferroelectricity and endurance of Hf0.5Zr0.5O2 thin films. Through techniques such as grazing incidence X-ray diffraction, transmission electron microscopy, and piezoresponse force microscopy, we investigate their structural characteristics and domain switching behaviors. The experimental results indicate that the inhomogeneous distribution of Hf/Zr elements contributes to improve frequency stability and endurance, while maintaining a large remnant polarization in the Hf0.5Zr0.5O2 ferroelectric thin films. By adjusting the distribution of Zr/Hf elements within the Hf0.5Zr0.5O2 thin films, significant enhancements in remnant polarization (2Pr > 35 μC/cm 2 ) and endurance (>10 9 ) along with reduced coercive voltage can be achieved. Additionally, the fabricated ferroelectric thin films also exhibit high dielectric tunability (≥ 26%) under a low operating voltage of 2.5 V whether in wake-up state or not. This study offers a promising approach to optimize both the ferroelectricity and endurance of HfO2-based thin films.