Derry are back on top of Division One of the Allianz NFL.
In a highly entertaining encounter, Mayo lost out by five points.
Derry were nine up at one stage in the second half, bringing it back to two.
The comeback was largely inspired by 1-1 from Paul Towey who goaled seconds after coming on.
Jordan Flynn's rocket hit the net in the first half for Mayo's other goal.
Derry were full value for their victory today with goals from Conor McCluskey, Shane McGuigan and Niall Loughlin.
The Ballintubber Stores & Service Station Man of the Match was named as Paul Cassidy by Midwest Radio co-commentator Michael Moyles.
Mayo take on Monaghan in the final game of the league next weekend.
Full time from Hastings Insurance MacHale Park:
Mayo 2-13 Derry 3-15