Using the chemical coprecipitation method, magnetic magnetite nanoparticles (MNP) were synthesized, the surface of which was modified with biocompatible cationic polyelectrolytes polyethylenimine (PEI) and chitosan (Cht). The MNP were characterised by transmission microscopy and zeta potential measurements. The initial MNP have a shape close to spherical and an average size of (10±3) nm. Immobilization of polyelectrolyte on the surface of MNP led to the appearance of aggregates with an interconnected porous network (shell) around individual particles, with average sizes of (12±2) and (15±2) nm for Fe3O4@PEI and Fe3O4@Cht, accordingly. The influence of various experimental parameters, such as pH, extraction time, amount of sorbent and initial dye concentration on the adsorption and desorption of food azo dyes Allure Red AC (E129) and Brilliant Black BN (E151) was studied. It has been shown that under optimal conditions the degree of extraction of these dyes from aqueous solutions is 96-100%, the concentration coefficient is 2.7×103 and sorption capacity of 56 and 94 mg/g for Fe3O4@PEI and 46 and 69 mg/g on Fe3O4@ХТЗ for E129 and E151, respectively. A comparison of sorption isotherms and process kinetics showed that the Langmuir model and pseudo-first order are preferable for describing the sorption of dyes. In the acidic and neutral regions, electrostatic interactions are responsible for sorption, and in the alkaline region, hydrogen bonding and hydrophobic interactions also play a significant role. The proposed sorbents can be used both for the sorption and concentration of dyes in chemical analysis, and for the purification of wastewater from them. Nanomagnetite modified with polyethylenimine, which allows absorbing and concentrating dyes over a wide pH range of 6-9 is preferable for use.