Cook joined Fulham for £2.5million in July 2007 but was allowed to join Charlton on loan in January and spent the second half of the campaign with the Addicks.
Cook is relishing his return to QPR, where he was a hugely popular player until his departure last summer.
"I'm absolutely delighted to be back," he told qpr.co.uk.
"Once it became clear I could leave Fulham there was only one club I wanted to move to."
QPR boss Iain Dowie has been allowed to strengthen his squad substantially this summer, and Cook said: "As a QPR player and a QPR fan, I'm absolutely buzzing ahead of the new season."
Dowie said of his new signing: "He's proven at this level, has great quality and he'll certainly have some fire in his belly after a very frustrating season with Fulham."