Michael Conroy's goal proved the difference as Mayo gained revenge for last September's All-Ireland final defeat by Donegal.
A great run by Keith Higgins set up Conroy who scored in the second half to send Mayo on their way to a 1-10 to 0-09 win at Castlebar.
It leaves Donegal with still some work to do as they attempt to stay clear of the relegation positions.
They are at home to Dublin in their last match on 7 April.
The result moves Mayo edged closer to safety.
Both teams finished with 14 men as Donegal's Anthony Thompson and then Mayo full-forward Jason Doherty were sent-off after receiving two yellow cards.
Donegal had started well with Michael Murphy and Colm McFadden scoring two points each.
McFadden fine 35-yard score from play gave Donegal a 0-4 to 0-1 lead in the 16th minute - but it was to be their last score of the half.
Mayo led six points to four at the break and kept their noses in front.