The free surface instability of a magnetic fluid in the Hele-Shaw cell with a time dependent gap is theoretically and numerically studied. The numerical algorithm is based on the boundary integral equation technique previously developed. Numerical results illustrate the role of magnetic forces in the instability—they diminish the selected wavelength of the interface perturbations, lead to more pronounced tip splitting events, and select the mode by which the droplet restores the circular shape at large thickness of the gap, when the role of the capillary forces is larger.