The 29-year-old midfielder has been in the south of France over the past couple of days trying to seal a protracted deal with the Ligue 1 leaders.
The move, which was first mooted almost a fortnight ago, was finally announced just minutes before Friday's 11pm transfer deadline.
Speaking on his Twitter account, Barton said: "I am now a player for L'OM. What a birthday present! Cannot wait to get going.
"I would also like to thank Tony Fernandes [QPR chairman] and Amit Bhatia [QPR vice-chairman] for making this possible. Good luck to everyone at QPR for this season."