We present a new approach to femtosecond direct laser writing lithography to pattern nanocavities in ferromagnetic thin films. To demonstrate the concept we irradiated 300~nm thin nickel films by single intense femtosecond laser pulses through the glass substrate and created complex surface landscapes at the nickel-air interface. Using a fluence above the ablation threshold the process is destructive and irradiation leads to the formation of 200~nm thin flakes of nickel around the ablation crater as seen by electron microscopy. By progressively lowering the peak laser fluence, slightly below the ablation threshold the formation of closed spallation cavities is demonstrated by interferometric microscopy. Systematic studies by electron and optical interferometric microscopies enabled us to gain an understanding of the thermo-mechanical mechanism leading to spallation at the solid-molten interface, a conclusion supported by molecular dynamics simulations. We achieved a control of the spallation process that enabled the fabrication of closed spallation nanocavities and their periodic arrangements. Due to their topology closed magnetic nanocavities can support unique couplings of multiple excitations (magnetic, optical, acoustic, spintronic). Thereby, they offer a unique physics playground, before unavailable, for magnetism, magneto-photonic and magneto-acoustic applications.