Maiga, who joined the Hammers from Sochaux during the summer of 2012, has struggled to make an impact at Upton Park and has netted just two goals in 19 appearances this season.
The Mali international underwent a medical at Loftus Road, with the deal only being finalised as the clock counted down towards the 11pm deadline.
Manager Harry Redknapp had been keen to add more firepower to his squad after losing top-scorer Charlie Austin through injury.
Meanwhile, West Ham have confirmed that defender Razvan Rat has left the club by mutual consent.
The 32-year-old Romanian only moved to east London eight months ago on a free transfer after spending 10 years with Ukrainian club Shakhtar Donetsk.