Diabetic foot complications are a major cause of morbidity and mortality, particularly in Saudi Arabia. Understanding how knowledge influences preventive practices is critical for designing effective interventions. A cross-sectional study was conducted among 647 diabetic patients in Al-Qassim, utilizing self-administered questionnaires to assess their knowledge, attitudes, and practices regarding diabetic foot care. Confirmatory factor analysis identified three knowledge domains (physiological, complication, preventive), two attitude constructs, and four practice domains. Structural equation modeling was employed to compare direct, full, and partial mediation models, with multi-group analysis used to assess demographic moderators. Among participants, 74.2% demonstrated good knowledge and 93.4% reported positive attitudes, but only 63.7% had adequate practices. The partial mediation model showed the best fit (CFI = 0.938, RMSEA = 0.049), with 59.8% of knowledge effects on practices mediated through attitudes. Preventive knowledge exerted the strongest effects on attitudes (β = 0.497, P < 0.001) and practices (β = 0.482, P < 0.001), while physiological knowledge had no direct impact. Knowledge-practice pathways were significantly stronger in patients with higher education, longer diabetes duration, and greater exposure to formal education. Attitudes primarily mediate the link between knowledge and practice. Effective interventions should emphasize preventive knowledge, address attitudinal barriers, and be tailored to demographic profiles. Achieving at least 70% knowledge mastery appears essential for improving preventive behaviors.