Campbell, who spent his early playing days in west London, becomes manager Neil Warnock's fourth summer signing.
The striker told his new club's official website: It's a club that I supported as a kid.
"I grew up around here and QPR have played a massive part in my life.
"This was my first club, from six to 16, so to finally be back here at the age of 29 is really special."
He added: "It's a massive club and it means a lot to me to be back here where it all began.
"There were other clubs in the Premier League that showed an interest but when I heard QPR were in for me it was an offer I couldn't refuse - this is my club."
"He is a QPR fan and you can tell he has a great desire to do well for the club he supports.
"That shone through when I met up with him - he can't wait to play for us.
"He also gives us that extra element of pace which we need and I am sure he will prove to be a big hit with the fans at Loftus Road this season."