Goals from Heidar Helguson, Akos Buzsaky and Tommy Smith lifted Mark Hughes's QPR out of the Premier League relegation zone and left Wigan rooted to the bottom of the table.
Rangers were gifted the lead when James McCarthy handled in the area and Helguson converted the penalty.
Buzsaky fired home a stunning free-kick that went in off the post.
A Hugo Rodallega free-kick pulled a goal back for Wigan before Smith sealed QPR's win with a long-range effort.
Victory was Hughes's first in the Premier League since taking charge at Loftus Road and only Rangers' second at home this season.
The three points lifts them out of the relegation zone and puts five points between them and Wigan, who remain bottom with only 15 points.
The visitors started the brightest as they fired in two excellent crosses from the left but Rodallega failed to get on the end of both.
Luke Young and Jamie Mackie then forced Wigan goalkeeper Ali Al Habsi into good saves as Rangers began to dominate.
Did you know?
- The two previous times Rangers scored two goals at Loftus Road ended in defeat for the home side
And the hosts were gifted the lead after McCarthy inexplicably handled in the area as he defended a corner.
The referee immediately pointed to the spot to give QPR only their second penalty of the season.
Helguson stepped up and made no mistake beating the diving Al Habsi, who guessed the right way but could not keep the ball out.
Buzsaky then forced the Latics keeper into another save when he hit a long-range free-kick which was tipped just wide.
That should have served as a warning sign for Roberto Martinez's side but the Hungarian was given another chance moments later and this time he made no mistake.
Did you know?
- Wigan are the lowest goal-scorers out of any of the 92 clubs in the Football League
- This is the first time a meeting between the two sides has resulted in more than three goals
He curled a superb free-kick in off the post for his first goal since April 2011.
The goal gave him a real confidence boost and he forced Al Habsi into another superb save after the break.
However Wigan then began to look more comfortable and enjoyed more possession. They got back in it when they were awarded a free-kick in exactly the same place as Buzsaky had scored from in the first half.
Rodallega stepped up and curled the ball around the wall and into the top corner.
Conor Sammon went close for Wigan before Gary Caldwell conceded a second penalty for the visitors, pulling down Helguson just inside the area.
The Iceland international took the spot-kick himself but Al Habsi guessed correctly for the second time and this time made the save.
Helguson then hit a stunning long-range dipping half-volley which went just wide of the right-hand post.
Wigan were continuing to press but their challenge ended when Tommy Smith scored with a wonderful strike.
The former Derby forward, on as a substitute at half-time, hit a shot from 25 yards out which flew into the top left-hand corner.
Queens Park Rangers
- 01 Kenny
- 03 Hill
- 05 Hall
- 18 Young Booked
- 35 Ferdinand
- 14 Buzsaky (Derry - 82' )
- 17 Barton Booked
- 32 Wright-Phillips
- 09 Campbell (Smith - 46' )
- 12 Mackie
- 22 Helguson
- 24 Cerny
- 02 Orr
- 27 Ramage
- 04 Derry
- 10 Bothroyd
- 21 Smith
- 33 Macheda
- 26 Al Habsi
- 02 Gohouri Booked
- 05 Caldwell
- 17 Boyce (Stam - 69' )
- 31 Figueroa
- 04 McCarthy Booked
- 08 Watson
- 11 Moses
- 14 Gomez (Crusat - 61' )
- 16 McArthur (Sammon - 46' )
- 20 Rodallega
- 12 Pollitt
- 23 Stam
- 24 Lopez
- 07 Crusat
- 09 Di Santo
- 15 McManaman
- 18 Sammon
Live Text Commentary
Full Time The referee blows his whistle to end the game.90:00 +1:18
Shaun Wright-Phillips concedes a free kick for a foul on Steve Gohouri. Free kick taken by Ali Al Habsi.90:00 +0:59
Free kick awarded for an unfair challenge on Joey Barton by Conor Sammon. Direct free kick taken by Patrick Kenny.90:00 +0:28
Conor Sammon challenges Joey Barton unfairly and gives away a free kick. Free kick taken by Clint Hill.88:56
Unfair challenge on Ronnie Stam by Shaun Wright-Phillips results in a free kick. Ronnie Stam takes the direct free kick.88:32
Tommy Smith decides to take a short corner.88:10
Short corner taken by Tommy Smith from the left by-line.87:55
Jamie Mackie takes a shot. Blocked by Gary Caldwell.85:02
Ben Watson restarts play with the free kick.85:02 Booking
Booking Luke Young receives a caution for unsporting behaviour.84:48
Foul by Luke Young on Victor Moses, free kick awarded.81:52 Substitution
Substitution Shaun Derry joins the action as a substitute, replacing Akos Buzsaky.80:11
Assist on the goal came from Shaun Wright-Phillips.80:11 Goal scored
Goal! - Tommy Smith - QPR 3 - 1 Wigan A goal is scored by Tommy Smith from outside the penalty box to the top left corner of the goal. QPR 3-1 Wigan.77:39
Effort on goal by Jamie Mackie from inside the area goes harmlessly over the bar.74:59
Heidar Helguson has an effort at goal from the edge of the area that misses to the right of the target.73:26
Akos Buzsaky produces a right-footed shot from just outside the penalty box that misses to the left of the target.73:03 Penalty
Penalty taken by Heidar Helguson saved by Ali Al Habsi. QPR 2-1 Wigan.71:15
James McCarthy concedes a free kick for a foul on Joey Barton. Anton Ferdinand restarts play with the free kick.70:42
Shot from close in by Conor Sammon misses to the left of the goal.
Conor Sammon produces a right-footed shot from deep inside the area which goes wide of the left-hand post. Gary Caldwell challenges Heidar Helguson unfairly and gives away a Penalty.69:53
Free kick taken by Ben Watson.69:53 Booking
Booking Joey Barton is shown a yellow card.69:40
Foul by Joey Barton on Victor Moses, free kick awarded.68:06 Substitution
Substitution Ronnie Stam comes on in place of Emmerson Boyce.67:46
Free kick awarded for an unfair challenge on Shaun Wright-Phillips by Gary Caldwell. Direct free kick taken by Clint Hill.67:03
Heidar Helguson gives away a free kick for an unfair challenge on Steve Gohouri. Direct free kick taken by Ali Al Habsi.65:14
The assist for the goal came from Maynor Figueroa.65:14 Goal scored
Goal! - Hugo Rodallega - QPR 2 - 1 Wigan Hugo Rodallega grabs a goal direct from the free kick from a long way out to the top right corner of the goal. QPR 2-1 Wigan.64:17
Maynor Figueroa fouled by Joey Barton, the ref awards a free kick.63:33
Outswinging corner taken by Ben Watson, Hugo Rodallega takes a shot. Clint Hill gets a block in.60:08 Substitution
Substitution Albert Crusat is brought on as a substitute for Jordi Gomez.58:55
Tommy Smith takes a shot. Blocked by Ben Watson.58:25
Corner from the right by-line taken by Akos Buzsaky, clearance by James McCarthy.58:09
Shot by Akos Buzsaky. Save by Ali Al Habsi.56:58
Free kick awarded for a foul by Conor Sammon on Anton Ferdinand. Patrick Kenny restarts play with the free kick.56:06
Jordi Gomez produces a left-footed shot from just outside the box that misses to the right of the target.50:37
Victor Moses challenges Akos Buzsaky unfairly and gives away a free kick. Patrick Kenny takes the direct free kick.47:53
Hugo Rodallega takes a shot. Blocked by Clint Hill.45:01
The second half begins.45:01 Substitution
Substitution (Wigan) makes a substitution, with Conor Sammon coming on for James McArthur.45:01 Substitution
Substitution (QPR) makes a substitution, with Tommy Smith coming on for DJ Campbell.45:00 +1:58 Half time
Half Time The first half comes to an end.44:49
DJ Campbell provided the assist for the goal.44:49 Goal scored
Goal! - Akos Buzsaky - QPR 2 - 0 Wigan Akos Buzsaky hits the back of the net with a goal direct from the free kick from outside the area low into the middle of the goal. QPR 2-0 Wigan.43:30 Booking
Booking The referee books Steve Gohouri for unsporting behaviour.43:21
Unfair challenge on DJ Campbell by Steve Gohouri results in a free kick.41:57
The offside flag is raised against Hugo Rodallega. Patrick Kenny takes the free kick.40:50
Inswinging corner taken right-footed by Joey Barton.39:45
Shaun Wright-Phillips fouled by Gary Caldwell, the ref awards a free kick. Shot comes in from Akos Buzsaky from the free kick, Ali Al Habsi makes a save.39:00
The assistant referee flags for offside against Hugo Rodallega. Patrick Kenny takes the free kick.36:46
Ben Watson concedes a free kick for a foul on Heidar Helguson. Akos Buzsaky restarts play with the free kick.35:08
Free kick awarded for an unfair challenge on Joey Barton by Ben Watson. Patrick Kenny takes the free kick.33:54
Free kick awarded for a foul by James McArthur on DJ Campbell. Free kick crossed by Joey Barton.32:20
Joey Barton provided the assist for the goal.32:20 Goal scored
Goal! - Heidar Helguson - QPR 1 - 0 Wigan Penalty taken right-footed by Heidar Helguson and scored. QPR 1-0 Wigan.31:41 Booking
Booking James McCarthy goes into the referee's book for unsporting behaviour.31:20
James McCarthy handles the ball and concedes a .30:40
Corner taken by Joey Barton from the left by-line.30:26
Jamie Mackie takes a shot. Save by Ali Al Habsi.28:21
Akos Buzsaky has shot on goal from a long way out that goes wide left.26:39
Shaun Wright-Phillips takes a shot. Emmerson Boyce gets a block in.26:26
Akos Buzsaky takes a shot. Blocked by Ben Watson.25:55
Jordi Gomez concedes a free kick for a foul on Joey Barton. Anton Ferdinand takes the direct free kick.23:22
Corner taken right-footed by Akos Buzsaky to the near post, save by Ali Al Habsi.22:14
Foul by Luke Young on Victor Moses, free kick awarded. Ali Al Habsi takes the free kick.16:55
Victor Moses has an effort at goal from outside the penalty box missing to the wide right of the goal.16:44
Hugo Rodallega takes a shot. Fitz Hall gets a block in.15:44
Effort from the edge of the penalty box by DJ Campbell goes wide of the right-hand upright.15:12
Shaun Wright-Phillips takes a shot. Blocked by Gary Caldwell.13:43
Inswinging corner taken right-footed by Akos Buzsaky from the left by-line to the near post, James McCarthy makes a clearance.12:26
James McArthur fouled by Jamie Mackie, the ref awards a free kick. Free kick taken by Ben Watson.11:09
Shot from just outside the penalty area by Heidar Helguson misses to the left of the target.9:42
Maynor Figueroa fouled by DJ Campbell, the ref awards a free kick. Ali Al Habsi takes the free kick.8:49
Free kick awarded for an unfair challenge on Shaun Wright-Phillips by Maynor Figueroa. Free kick crossed right-footed by Joey Barton, Maynor Figueroa makes a clearance.7:27
James McCarthy challenges Joey Barton unfairly and gives away a free kick. Anton Ferdinand restarts play with the free kick.1:58
Free kick awarded for a foul by Luke Young on Victor Moses. A cross is delivered by Jordi Gomez, Emmerson Boyce produces a right-footed shot from inside the area that clears the crossbar.0:00
The match has kicked off.
Live data and text provided by our data suppliers