A late point from Fergal Boland secured Mayo a dramatic 1-12 to 0-14 win in Saturday's Division One fixture in Castlebar.
The All-Ireland champions started the game well, with Jack McCafferkey impressing as he was among the early scorers to get into a 0-5 to 0-1 lead after 17 minutes.
Helped by frees from Ryan O'Donoghue, Mayo found a way back into the game and went in level at half-time with the score 0-8 each.
Dublin started the second half the same as the first with the first three scores of the game. However, Mayo took the lead through a goal from Stephen Coen, after he got on to the end of Jordan Flynn's high ball.
The sides were level on a number of occasions in the final minutes, as both pushed for the winning score. Then, in the 71st minute, up stepped Boland with a the winning point after a clever free kick.
In Division Two, Armagh had too much for Meath in a 2-16 to 0-10 win at the Athletic Grounds.
It was tight contest for much of the first half, but Cian McConville's goal in the 32nd minute pushed Armagh on with their second goal coming just after the first half through Ciaran Mackin.
Elsewhere in the Division, goals from Declan McCusker and Seán Cassidy helped Fermanagh to 2-10 to 0-14 win over Kildare.
In Division Three, Down ran out as comfortable winners over Limerick by 3-15 to 0-9.
In Division Four, Carlow defeated Waterford, and Laois were comfortable winners over Waterford.
Hurling
The Allianz National Hurling League got underway this weekend, with wins for Tipperary and Galway in Division One.
Tipperary had too much for Dublin in Parnell Park to run out 2-27 to 0-22 winners.
Gearoid O'Connor scored 0-12 for Tipperary, as they took a 0-17 to 0-9 lead into the interval.
An goal in the 43th minute from Sean Ryan extended the lead, while Jake Morris got their second in the 64th minute, as he scored 1-4 from full forward.
In Pearse Stadium, it was a comfortable afternoon for Galway, as they were 4-31 to 0-12 winners over Westmeath.
Evan Niland scored 0-11 for Galway, with all of there goals coming the second half.
Jason Flynn scored their first in the 44th minute, with the second coming 10 minutes later through Ciaran Fahy.
Flynn scored his second in the 58th minute, with substitute Conor Whelan scoring their fourth in the 68th minute, as Galway ran out 31 point winners.