Wigan old boy Karl Pryce ran in two of Bradford's tries as the troubled Bulls shocked Super League leaders Wigan to end their 13-game winning run.
Bradford, whose future remains in doubt after entering administration, led 18-16 at half-time thanks to Luke Gale's three from three with the boot.
Wigan edged ahead again after the break but the dismissal of Michael McIlorum turned the game in the visitors favour.
Late tries from Elliott Whitehead and Pryce, his second, guided them home.
Wigan, already without long-term casualties Pat Richards and Thomas Leuluai, were made to pay the price for resting star asset Sam Tomkins.
And they were without four forwards, Paul Prescott, Jeff Lima, Harrison Hansen and Gil Dudson.
But their disappointment will have been softened by the news that fellow challengers Warrington also lost, slipping to defeat by Salford.
Bradford switched Jarrod Sammut into the halves at the expense of Ben Jeffries, bringing in the power of Manase Manuoakafoa, as Bryn Hargreaves made way.
There was little hint of the drama to come when Anthony Gelling finished off a slick Wigan move with an early try and they were soon further ahead.
With Pryce sinbinned for holding down Darrell Goulding, Tomkins' stand-in Jack Murphy got off the mark with a try in his mentor's mould, running in from 50 metres.
Yet Bulls were in no mood to roll over, taking the lead through converted tries from Pryce and then Brett Kearney following good work from Keith Lulia.
Whatever Shaun Wane had said to his Wigan side at the break appeared to have taken effect when early home second-half pressure paid off.
Prop Dom Crosby went through a gap in the Bradford defence to register his first Super League try, Charnley adding his third goal.
But hooker McIlorum was then sent off for swinging a punch at Bulls second-row Oliver Elima to leave the hosts down to 12 men.
It was the encouragement Bradford needed, second-row Whitehead jinking to the line before Pryce collected Gale's crossfield kick to ensure a priceless victory.
Bradford coach Mick Potter:
"I'm very pleased with the players, it's been a tough place to win. It was a fantastic effort. It's great for their morale and I'm really happy for fans that came across because they were on a hiding to nothing.
"With the distractions, it is satisfying for them to come out and have a bit of success. You can't take anything away from what they've achieved tonight. With a bit of grit and determination, nothing was going to stop them. They were pretty determined to get the result.
"It's a fantastic club and you'd like to see them continue, the only way for them is up. I'm sure there are people out there who want to invest in the club. We just need to get to know who they are and get them on board."
Wigan coach Shaun Wane said:
"We were beaten by the better team, I suppose. They wanted it a bit more. They had more of a need to win that game.
"With what happened to Micky [McIlorum] and losing Darrell Goulding, the changes we made beforehand, losing Sam, I knew it was never going to be an easy game. We needed to play well and they were in a desperate situation. Fair play to them, they played better than us.
"We weren't on our game. This is a blip and we will fix it."
FRIDAY NIGHT'S LINE-UPS
Wigan: Murphy; Charnley, Goulding, Carmont, Gelling; O'Loughlin, Finch; Lauaki, McIlorum, Mossop, Lloyd, Hock, Farrell.
Replacements: L Tomkins, Hughes, Crosby, Flower.
Bradford: Kearney; Ainscough, Platt, Lulia, Pryce; Sammut, Gale; Elima, L'Estrange, Manuokafoa, Bateman, Whitehead, Langley.
Replacements: Burgess, C Walker, O'Brien, Olbison.
Referee: Tim Roby (RFL).