The bid of HK$6.30 per share is worth a total of HK$6.53 billion (US$843 million, €636 million ) and was approved by China's commerce ministry, the companies said in a joint statement.
Magic's MG brand is one of the leaders in China's fast-growing cosmetic facial mask market.
Present in China since 1997, L'Oreal has 3,500 employees in the country where it operates two plants and a research centre.
Last week, L'Oreal said it was halting the sale of its Garnier brand in China to focus on its L'Oreal Paris and Maybelline New York mass market brands, which have been enjoyed better sales.
Western companies believe that the beauty and personal health products market in China, which accounted for more than a quarter of luxury goods sales there, still has enormous potential.
However the sector has recently felt the chilling effect of a Chinese government clampdown on corruption, which often takes the form of gifts of luxury goods.