Sanchez saw an early penalty saved by Rob Green, but the Arsenal star got the better of the Englishman later on in the half, heading past him from eight yards for the opener.
Olivier Giroud was sent off after the break for a headbutt on Nedum Onuoha, but the 10 men got a second through Rosicky, slotting past Green after good work from Sanchez.
Charlie Austin’s penalty halved the deficit with 11 minutes remaining after Mathieu Debuchy’s trailing leg brought down Junior Hoilett, but Arsenal held on to return to sixth place in the Premier League.
The result means QPR have now lost nine consecutive Premier League away games, equalling a top-flight record in the process.
Arsenal were under pressure even before kick-off after four of the five teams above them at the start of the day picked up wins, putting Arsene Wenger’s side down in eighth.
But they started on the front foot, winning a penalty after eight minutes after former Gunner Armand Traore brought down Sanchez as the winger moved away from goal.
Sanchez dusted himself off to take the spot kick, but Green guessed correctly and dived down to his left to bat away the tame effort.
QPR kept out the hosts for most of the half thanks to Steven Caulker and Rio Ferdinand, both thwarting Giroud in dangerous areas, before the Frenchman forced a good save out of Green from a free-kick 25 yards out.
But Arsenal finally took the lead eight minutes before half-time, breaking the visitors’ resistance.
Rosicky, who impressed throughout at the Emirates, combined well with Danny Welbeck and Santi Cazorla before Kieran Gibbs’ drilled centre found Sanchez unmarked to head past Green.
A minute later, Caulker’s diving header at the other end skidded a yard wide of Wojciech Szczesny’s right-hand post, a warning sign from the visitors.
And Arsenal were down to 10 men on 53 minutes, with Giroud headbutting QPR defender Onuoha after complaining that he was pushed in the back as he went in to block Green’s clearance.
Harry Redknapp made two changes shortly after the red card, bringing Hoilett and Leroy Fer on to alter their formation, but their man advantage didn’t tell as the hosts doubled their lead.
Having glided between two QPR defenders, Sanchez offloaded the ball to Rosicky on the right-hand side of the penalty area, leaving the midfielder to slot past Green via a slight deflection.
Sanchez nearly got his second, curling over from 15 yards, but QPR refused to back down as they found a way back into the game.
Substitute Hoilett advanced into the area and was brought down by Debuchy, despite replays showing the defender got the slightest of touches on the ball, and Austin smashed the penalty down the middle with confidence for his 12th goal of the season.
Hoilett and Niko Krancjar wasted several opportunities late on, but it was Mauricio Isla who came closest to equalising, seeing his goal-bound near-post header from a corner cleared by Mathieu Flamini.
And Arsenal held on for all three points, giving Arsene Wenger his 400th Premier League victory and 600th in all competitions.
Arsenal: Szczesny (6), Debuchy (6), Mertesacker (7), Monreal (7), Gibbs (6), Flamini (6), Cazorla (6), Rosicky (8), Sanchez (8), Giroud (5), Welbeck (5)
Subs: Chambers (6), Coquelin (6),
QPR: Green (7), Onuoha (6), Ferdinand (6), Caulker (7), Isla (6), Mutch (5), Henry (6), Kranjcar (6), Traore (6), Austin (6), Vargas (6)
Subs: Fer (6), Hoilett (5), Zamora (6)
Man of the match: Alexis Sanchez