A mechanism for the depinning of dislocations pinned by a stopper is formulated. This mechanism includes the transfer of an electron from a dislocation to the stopper and the appearance of a spin two-electron nanoreactor that has no Coulomb interaction that would hold the dislocation at the stopper in the initial state. The spin dynamics in the nanoreactor is controlled by a magnetic field; therefore, it causes magnetoplasticity and short-term magnetic memory. Another origin of magnetoplasticity is the aggregation of diffusing paramagnetic ions (stoppers) into dimers, trimers, and clusters; this aggregation is also spin-selective and magnetically sensitive. The magnetic-field dependence of the structural evolution of the stoppers provides long-term magnetic memory in diamagnetic solids. Both mechanisms of magnetoplasticity and magnetic memory can coexist and be independent of or dependent on each other.