The establishment of the ecological compensation mechanism is conducive to the ecological protection and high-quality development of the Yellow River Basin. From the perspective of water footprint, this paper discussed the use of water resources in nine provinces and regions of the Yellow River Basin from 2011 to 2020, and determined the payers and payees of ecological compensation and the respective ecological compensation standards. The results indicate that the water footprint of the Yellow River Basin showed an overall increasing trend with different composition ratios, which is manifested as agricultural water footprint > industrial water footprint>domestic water footprint>export virtual water footprint>import virtual water footprint>ecological water footprint. As for the ecological compensation standards, the Yellow River Basin was the main compensation payer with fluctuated standards, the highest compensation standard reached ¥341.542×109 in 2015 and the lowest was ¥1.275×109 in 2020, with an average annual compensation of ¥177.251×109. Furthermore, Ningxia, Shanxi, Henan, and Shandong were also the main payers of ecological compensation, showing an upward trend, with an average ranking of Henan>Shandong>Shanxi>Ningxia. Sichuan was a rapidly increasing ecological compensation payee, with an average annual compensation value of ¥306.009×109; Qinghai was in a relatively slow upward trend as an ecological compensation payee, with an average annual compensation value of ¥134.014×109. Gansu has gradually transformed from the payer of ecological compensation to the payee; Inner Mongolia was the payee of ecological compensation only in 2013, and transformed to the the payer in the other years; the identity of the payer and payee of ecological compensation of Shaanxi has been constantly changing. So, the Yellow River Basin should leverage its regional advantages to promote high-quality agricultural development, establish a sound ecological compensation mechanism, and alleviate the pressure on water resources demand through innovation in water-saving technology and improvement of water efficiency.