The Slaneysiders were reduced to 14 when substitute Conor McDonald was red-carded in the 54th minute and 13 minutes later Shaun Murphy was dismissed on a second yellow.
Within a minute later Dublin full-back Eoghan O'Donnell was also gone on a second yellow in a dramatic finale.
The introduction of Eamonn Dillon looked like he might get Dublin over the line to victory as he struck over one brilliant point and showed well.
But Wexford seized the late initiative with Jack O'Connor's late goal when he fired to the net after the Dublin defence was left exposed.
Cian Boland reduced the arrears before Ronan Hayes set off for goal but was hooked by Kevin Foley as he attempted a point effort.
But overall, the accuracy of Rory O'Connor, along with his brother's goal, and the dead-ball striking of Paul Morris saw Davy Fitzgerald's men to victory.
That loss was one of three defeats that Dublin suffered in Division 1B as they also registered reverses against both Clare and Kilkenny.
In contrast, Wexford enjoyed an encouraging campaign, winning four of their five group games with their sole defeat coming at the hands of Clare.
SCORERS – Dublin: P Ryan 0-8 (0-8f), R McBride, R Hayes (0-1f) 0-2 each, J Madden, C Crummey, D Burke, O O’Rorke (0-1f), C Boland, E Dillon 0-1 each. Wexford: P Morris 0-7 (0-3f, 0-1 '65'), R O’Connor 0-4 (0-1f), J O’Connor, M Fanning (1-0pen) 1-0 each, D O’Keeffe, P Foley, L Chin (0-1f) 0-1 each.
DUBLIN: S Brennan; P Smyth, E O'Donnell, C O'Callaghan; J Madden, D Gray, S Moran; C Crummey, J Malone; D Burke, R McBride, D Sutcliffe; O O'Rorke, R Hayes, D Keogh. Subs: P Ryan for O’Rorke (13), C Boland for Sutcliffe (43), E Dillon for Keogh (53), A Dunphy for O’Callaghan (58), T Connolly for Madden (62).
WEXFORD: M Fanning; J O’Connor, L Ryan, C Firman; D Reck, M O’Hanlon, S Murphy; A Rochford, D O’Keeffe; K Foley, L Chin, R O’Connor; P Morris, M Dwyer, A Nolan. Subs: P Foley for O’Hanlon (half-time), L Óg McGovern for Rochford (half-time), J O’Connor for Chin (47), C McDonald for Dwyer (48), C Dunbar for Nolan (69).
Referee: Johnny Murphy (Limerick).