The electrosorption of Gd$^{3+}$ ions from aqueous 70$,$mM Gd(NO$_3$)$_3$ solution in monolithic carbon aerogel electrodes was recorded by dynamic neutron imaging. The aerogels have a bimodal pore size distribution consisting of macropores centred at 115$,$nm and mesopores centred at 15$,$nm. After the uptake of Gd$^{3+}$ ions by the negatively charged surface of the porous structure, an inhomogeneous magnetic field was applied to the system of discharging electrodes. This led to a convective flow and confinement of Gd(NO$_3$)$_3$ solution in the magnetic field gradient. Thus, a way to desalt and capture paramagnetic ions from an initially homogeneous solution is established.