Several examples of nanosized therapeutic and imaging agents have been proposed to date, yet for most of them there is a low chance of clinical translation due to long-term in vivo retention and toxicity risks. The realization of nano-agents that can be removed from the body after use remains thus a great challenge. Here, we demonstrate that non-equilibrium gold-iron alloys behave as shape-morphing nanocrystals with the properties of self-degradable multifunctional nanomedicines. DFT calculations combined with mixing enthalpy-weighted alloying simulations predict that Au-Fe solid solutions can exhibit self-degradation in aqueous environment if the Fe content exceeds a threshold that depends upon element topology in the nanocrystals. Exploiting a laser-assisted synthesis route, we experimentally confirm that non-equilibrium Au-Fe nanoalloys have a 4D behavior, that is the ability to change shape, size and structure over time, becoming ultrasmall Au-rich nanocrystals. In vivo testsshow the potential of these transformable Au-Fe nanoalloys as efficient multimodal contrast agents for magnetic resonance imaging and computed x-ray absorption tomography and further demonstrate their self-degradation over time, with a significant reduction of long-term accumulation in the body, when compared to benchmark gold or iron oxide contrast agents. Hence, Au-Fe alloy nanoparticles exhibiting 4D behavior can respond to the need for safe and degradable inorganic multifunctional nanomedicines required in clinical translation.