The 48-year-old moved to Layer Road in September, and helped Geraint Williams guide the Us to 10th in the Championship.
He will now work with Scunthorpe-born manager John Gregory at Loftus Road.
"I was very impressed by what John had to say when I met him," Harford told QPR's official website.
"It was a difficult decision to leave Colchester but this was an opportunity I just couldn't turn down."