In the present study, a magnetic ion-imprinted polymer based on n-allylthiourea in the presence of 1-(2-pyridylazo)-2-naphthol (MIIP-PAN) was synthesized, characterized, and applied in the preconcentration of nickel ions by dispersive magnetic solid phase extraction (DMSPE) with FAAS detection. For comparison, non-imprinted polymer (MNIP-PAN) and imprinted polymer without PAN were synthesized. The characterization of the polymers was performed by FT-IR, DRX, TEM, TGA, VSM, and BET. Selectivity studies were performed comparing the competitive adsorption of Ni2+ with other cations on MIIP-PAN and MNIP-PAN, achieving higher relative selectivity coefficients for MIIP-PAN than for MNIP-PAN and NIP. Under optimized conditions, the method provided a preconcentration factor of 76.70, detection limit of 0.25 µg/L and intra-day (2.06 – 2.33 %) and inter-day (1.82 – 4.90 %) precision. The developed method was applied to samples of water, teas, and chocolate powder, and its precision was evaluated through tests of recovery and analysis of certified materials.