The invention discloses amphiphilic segmented copolymers, nanoparticles containing the amphiphilic segmented copolymers, a preparation method of the amphiphilic segmented copolymers and a use of the nanoparticles. The amphiphilic segmented copolymers are shown in the structural formulas (I) to (IV). In the structural formulas (I) to (IV), R1 represents H or methyl, R2, R3 and R5 represent H, alkyl or aryl, R4 represents hydroxyl or methyl, x is an integer of 3-20, Spacer is a spacer arm, the spacer arm is optional, and when the spacer arm exists, the spacer arm is one of an ester group, an alkyl group, a triazole group and a thioether group. The nanoparticle obtained by chelating of the amphiphilic segmented copolymer and rare earth ions has good biocompatibility, has excellent fluorescence imaging performances and MRI imaging performances and has a wide application value in the field of medicine and biology and especially in breast cancer diagnosis and treatment.