Mayo will face Donegal in the All-Ireland Senior Football final after the Connacht champions survived a late Dublin comeback to win 0-19 to 0-16.
Mayo began Sunday's semi-final at Croke Park strongly and led by six points, 0-12 to 0-6, at half-time.
Five unanswered points saw them extend their lead to 0-17 to 0-7, but then Dublin replied with eight consecutive points to move to within two.
Late points by Cillian O'Connor and Seamus O'Shea helped Mayo progress.
Two frees by Bernard Brogan had got the Dubs off to a good start but five points from Mayo saw them take command of the first period.
Dublin scored the first point of the second half but points from O'Connor (3), Richie Feeney and Alan Dillon saw Mayo increase their advantage substantially.
Bernard Brogan (4), Paul Flynn (2), Stephen Cluxton (2) and Ciaran Kilkenny all knocked the ball between the posts during Dublin's second-half revival, while Brogan was denied by a brilliant save from David Clarke at a crucial stage.
Mayo rallied late in the game to ensure their meeting with the Ulster champions at Croke Park on 23 September.