The American center back, whose career has included spells at Standard Liege, Newcastle, Milan and Sporting Lisbon, has decided to join Harry Redknapp's promotion contenders.
The 31-year-old has been training with QPR recently after leaving Sporting Lisbon at the end of last season. Onyewu has accumulated 68 caps and represented the USA at the past two World Cups, but has seen injuries and inconsistent playing time on the club level limit him to two national team appearances in 2013.
"I'm thrilled to get this period over with and finally secure my future," Onyewu told QPR's official website. "QPR are a club with huge ambitions to return to the Premier League and I wanted to be part of it.
"I've had a really good feeling about QPR from the moment I arrived here. I've been welcomed by the club and I feel good here already. I've already integrated well into the group, so I'm looking forward to what will hopefully be a very successful and happy time here."
QPR sit second in the Championship after claiming eight wins and three draws from their first 11 matches this season.