We report a facile synthesis of Au–Fe heterodimer nanoparticles (NPs) with tunable Au/Fe sizes and their sequential oxidations to Au–Fe3O4 heterostructured NPs with controllable morphologies. The size of Au in Au–Fe heterodimer NPs was tuned to be 4, 7 and 10 nm, while the Fe crystal structure was maintained as single-crystal bcc. Further oxidation of the as-synthesized Au–Fe NPs led to the formation of Au–hollow Fe3O4 yolk–shell, Au–hollow Fe3O4 heterodimer NPs and Au–porous hollow Fe3O4 yolk–shell NPs, depending on the size of the Au–Fe NPs and the oxidation conditions used. Our study has provided not only a variety of bifunctional NPs with tunable surface plasmon absorption and magnetic properties, but also a new general approach to design and synthesize multicomponent NPs with multiple heterostructures.