This study introduces an analysis for determining factors of diet quality among the Spanish adult population in North Africa with the aim of promoting healthier eating habits to prevent the development of diabetes mellitus. It is a diagnostic, non-experimental, cross-sectional and observational study, with a descriptive correlational methodology, with 201 participants from Ceuta and Melilla. The information collection has been carried out through the 24 h diet recall. Various sociodemographic factors influencing the quality of the diet have been analyzed. People from Melilla adopt a carbohydrate-rich diet (p = 0.004), whereas people from Ceuta have a lipid-rich diet (p = 0.002), particularly a high- monounsaturated-fat diet (p = 0.007). Muslims consume more sugar (p = 0.001) compared with Christians. Those working consume less carbohydrates (p = 0.13) than those not working. The latter consuming more fats (p = 0.39), and those with a higher education level show higher consumption of proteins (p = 0.001). The results of this study suggest that diet quality, in general, does not follow healthy recommendations established for the Spanish population, where the sugar consumption-diabetes relationship justifies the need for further research on Muslim population.