We study the spontaneous magnetization and the magnetic hysteresis using the gauge/gravity duality. We first propose a novel and general formula to compute the magnetization in a large class of holographic models. By using this formula, we compute the spontaneous magnetization in a model like a holographic superconductor. Furthermore, we turn on the external magnetic field and build the hysteresis curve of magnetization and charge density. To our knowledge, this is the first holographic model realizing the hysteresis accompanied with spontaneous symmetry breaking. By considering the Landau-Ginzburg type effective potential in the symmetry broken phase, we obtain the mass of the magnon from the bulk geometry data.