There is epidemiological evidence for associations between dietary patterns and type 2 diabetes. However, for sub-Saharan Africa, information on dietary patterns and their contribution to diabetes is lacking. The aim of the present study was to identify dietary patterns and their associations with type 2 diabetes in an urban Ghanaian population. In a hospital-based case–control study on risk factors for type 2 diabetes in Kumasi, a FFQ was administered to 675 controls and 542 cases. Dietary patterns were identified by using factor analysis including thirty-three food items. Logistic regression was used to evaluate the associations of dietary patterns with type 2 diabetes. Overall, two dietary patterns were identified: (1) a ‘purchase’ dietary pattern which positively correlated with the consumption of sweets, rice, meat, fruits and vegetables and (2) a ‘traditional’ dietary pattern that correlated with the intake of fruits, plantain, green leafy vegetables, fish, fermented maize products and palm oil. In the highest quintile of the ‘purchase’ dietary pattern, participants were younger, leaner and of higher socio-economic status than those in the lower quintiles. In contrast, participants in the highest quintile of the ‘traditional’ dietary pattern were older, heavier and more deprived compared with those in the lower quintiles. In the multivariate model, the ‘purchase’ dietary pattern was inversely associated with type 2 diabetes (OR per 1 sd 0·41, 95 % CI 0·33, 0·50); the ‘traditional’ dietary pattern increased the odds of diabetes per 1 sd by 54 % (95 % CI 1·35, 1·81). In conclusion, two diverse dietary patterns were identified and associated with type 2 diabetes in urban Ghana. The determinants of pattern adherence require further investigation.