Cook joined Fulham from Rangers in 2007 but because of injuries he never made a first-team appearance and was loaned back to Rangers last summer with a view to making the return permanent once he had proved his fitness.
Now Rangers have confirmed that the deal has has been concluded with Cook signing a three-and-a-half-year contract at Loftus Road.
"Everyone knows QPR are my club and I'm delighted to be back here.
"I feel as though I'm getting back to my best and I can't wait for the second half of the season," Cook told the Official Rangers website.