Evidence on the association between children’s food insecurity (FI) and dietary patterns (DPs) is scarce. This study assessed the association between children’s FI and a priori and a posteriori-defined DPs in a Portuguese population-based sample of children. A cross-sectional study including 2800 children from the 10-year-old follow-up of the Generation XXI birth cohort was performed. Data on food security status, assessed by the Self-administered Food Security Survey Module for children (SAFSSMC), dietary intake and socio-demographics were collected. A previously developed Healthy Eating Index (HEI) was adapted for this study. Using the HEI score and its food groups, linear and logistic regression models were performed. Using latent class analysis, five a posteriori-defined DPs were identified. The DPs names considered an overall picture of the DP. Food security status as a categorical (food security/FI) and continuous variable (SAFSSMC raw score: higher scores representing higher FI) was used. Multinomial logistic regression models were used to assess the association between food security status and DPs. Children’s FI (9·4 %) was inversely associated with the HEI score (β=–0·695;95%CI:–1·154,–0·235), representing worse diet quality. A higher SAFSSMC raw score was associated with low fruit and vegetables (OR=1·089;95%CI:1·023,1·159) and seafood and eggs consumption (OR=1·073;95%CI:1·009,1·142) and high consumption of meat and meat products (OR=1·091;95%CI:1·026,1·160), salty snacks (OR=1·067;95%CI:1·003,1·136) and soft drinks (OR=1·097;95%CI:1·031,1·168). The SAFSSMC raw score was positively associated with ‘Low consumption’ (OR=1·119;95%CI:1·016,1·232), ‘Energy-dense foods’ (OR=1·155;95%CI:1·028,1·298) and ‘Snacking’ (OR=1·119;95%CI:1·006,1·245) DPs. FI was associated with worse dietary choices. Intervention strategies targeting food insecure children should be developed to promote healthy dietary habits.