Chronic wounds affect over 20% of diabetic patients, imposing substantial socioeconomic and personal burdens. The diabetic wound microenvironment is characterized by hyperglycaemia, oxidative stress, persistent inflammation, and vascular damage, which disrupt tissue homeostasis and significantly hinder healing. The development of innovative multifunctional hydrogels is essential for treating diabetic wounds within such complex microenvironments. Based on metal-organic framework nanomaterials, this study introduces a dual-network crosslinked adhesive GelNB/HAMA hydrogel incorporating magnesium ions and Quercetin-based metal-organic frameworks (denoted as MgQu@GelNB/HAMA). In vitro experiments revealed that Mg-quercetin metal-organic framework (MgQu) promotes macrophage polarization from M1 to M2 type, scavenges reactive oxygen species, and stimulates neovascularization. Photopolymerization technology is employed to solidify the hydrogel into a dressing, ensuring strong adhesion to the wound site and minimizing secondary tissue damage while facilitating sustained, controlled release of Quercetin and magnesium ions. In a dorsal wound model of diabetic mice, this in situ formed multifunctional hydrogel dressing effectively reduces excessive inflammation, enhances neovascularization, accelerates collagen tissue regeneration, and advances wound healing. By improving the pathological microenvironment of diabetes, this study presents a promising new strategy for diabetic wound repair.