The former Nottingham Forest man has signed a three-year contract with Rangers and becomes their seventh signing of the summer.
The 29-year-old was the Latics’ Player of the Year for the past two seasons after joining the club from Newcastle United.
He told the Rangers website: “It’s great to be here and to have my future sorted out.
“Les [Ferdinand] and the gaffer sold the club to me brilliantly. They showed a great desire to bring me here, and that helped make up my mind.
“I know players who have played here before and they spoke about the club in good terms, so it was an easy decision for me.
“I’ve played in the Championship for quite a few years now and I know what to expect.
“It’s a tough division; it’s Saturday-Tuesday a lot of the time; there are no easy games, but we’ll front up the challenge head on and compete as best we can.
“I’m looking forward to the challenge of getting into the side and proving my worth at QPR.”
Rangers boss Chris Ramsey said: “James is a proven Championship performer, with great versatility across a number of positions.
“He can cover both full-back positions, centre-half and holding midfield, so he’ll be a real asset for us.”