A simple extension of the standard model (SM) providing transient magnetic moments to right-handed neutrinos is presented. In this model, the decay of the next-to-lightest right-handed heavy neutrino to the lightest one and a photon (${N}_{2}\ensuremath{\rightarrow}{N}_{1}+\ensuremath{\gamma}$) can explain the $\ensuremath{\sim}3.5\text{ }\text{ }\mathrm{keV}$ x-ray line signal observed by the XMM-Newton X-ray observatory. Beside the SM particles and heavy right-handed Majorana neutrinos, the model contains a singly charged scalar (${H}^{\ifmmode\pm\else\textpm\fi{}}$) and an extra Higgs doublet ($\mathrm{\ensuremath{\Sigma}}$). Within this minimal set of extra fields the sub-eV masses of left-handed neutrinos are also explained. Moreover, we show that the spin-independent dark matter--nucleon cross section is compatible with the latest LUX data.