Sliding ferroelectricity has been extensively studied as it provides an approach to designing van der Waals ferroelectric materials with nonpolar components. In this work, we demonstrate the sliding ferroelectricity of bilayer H–ScO2, which is formed by an interlayer antiferromagnetic configuration of monolayer H–ScO2 ferromagnetic material. The out-of-plane polarization results from charge transfer between the layers, causing an unequal charge distribution within them and yielding a polarization value of ±1.26 pC/m. We found that increasing the doping concentration suppresses the polarization value. This phenomenon results from the differing occupancy ratios of electrons and holes in the conduction and valence bands after introducing electron or hole doping into the system. The closer the number of electrons in the conduction band is to that in the valence band, the more pronounced the suppression of polarization. Our work offers a perspective for the design of advanced van der Waals ferroelectric materials.