In the northern North China Craton (NCC), abundant non-layered ultramafic complexes and associated low-grade Fe–Ti oxide ores (over 1000 million tons) were uncovered. However, their petrogenesis and metallogeny have remained unclear. The Habaqin complex is one of the larger intrusions of the region and hosts the largest low-grade magnetite occurrence. Here we present petrography, zircon U–Pb geochronology, mineral and whole-rock major and trace element compositions, and whole-rock Sr–Nd and zircon Lu–Hf isotopes of the complex to constrain its genesis. The complex includes early pyroxenite (∼75% clinopyroxene, ∼15% amphibole, ∼10% magnetite) and late hornblendite (∼80% amphibole, 15–20% magnetite, 0–5% apatite). Zircon grains from the hornblendite yielded a weighted mean 206Pb/238U age of 395 ± 2 Ma. The increasing whole-rock FeOtot and TiO2 contents from pyroxenite (FeOtot = 18.9 wt%, TiO2 = 1.31 wt%) to hornblendite (FeOtot = 19.1–30.4 wt%, TiO2 = 2.63–3.12 wt%) correlate with higher modal proportions of amphibole and magnetite. The pyroxenite and hornblendite display similar arc-like trace element characteristics of enrichment in LILEs and LREEs, and depletion in HFSEs. The complex formed by fractional crystallization of clinopyroxene, amphibole, magnetite, and apatite from a hydrous parent magma. Early removal of clinopyroxene caused H2O enrichment in evolved residual magmas and crystallization of magnetite and amphibole, forming low-grade mineralization with Ti-V-poor magnetite in hornblendite. The complex displays high initial 87Sr/86Sr ratios of 0.706413–0.707341, negative εNd(t) values of −16.0 to −14.2 and negative εHf(t) value of −30.6 to −12.0, suggesting a parent magma derived from an enriched lithospheric mantle, with possible existence of amphibole-bearing pyroxenite veins within the source. During the Early Devonian, the retreat of the subducted Paleo-Asian oceanic slab as well as arc-continental collision along the northern NCC induced partial melting of the veins and eventually formation of the complex.