Green's arrival at Loftus Road is likely to pave the way for Paddy Kenny's expected switch to Leeds United, where he will be reunited with former Rangers gaffer Neil Warnock.
Green, who has 12 caps, will arrive at his new club on July 1 when his contract with West Ham expires.
"Rob is someone with vast experience at international and Premier League level and his pedigree speaks for itself," QPR boss Mark Hughes said.
More to follow...
The Nike Hypervenom is the latest cleat silo from Nike. It will change your game and is worn by the game's top players.
Manchester City will try and win back the Premier League title with this new soccer jersey from Nike!
Support the USA national team with an official 2013 Centennial soccer jersey from Nike. Its Official.
The adidas Nitrocharge is the most talked about new cleat in years. It was released on May 15 and will take your pitch by storm.
Jamaica is in need of a win against the U.S. Get the jersey of the Reggae Boyz.
Neymar's move from Santos to Barcelona is no doubt the biggest summer transfer.
England will debut their new away jersey against Brazil at the Maracana Stadium on Sunday. Get in the Gear
Barcelona will wear this new home soccer jersey next season. They also have a new away jersey. Get them both.
The USA will wear their blue away jersey against Jamaica in their World Cup qualifier on Friday night.
Germany is one of the top teams ever and they will play the US on Sunday.