A diet rich in fruits and vegetables may reduce the risk of chronic diseases. However, in many countries, the majority of children do not eat the recommended quantities of fruits and vegetables. The present study aimed to understand associations between feeding practices in infancy (breast-feeding and first complementary food) and fruit and vegetable consumption in childhood (frequency and variety). Data were from the national, observational, cross-sectional Mothers and their Children’s Health study conducted in 2016/2017, a sub-study of the national Australian Longitudinal Study on Women’s Health. Mothers completed a written survey on feeding practices in infancy (breast-feeding duration, use of formula, first complementary food) and children’s fruit and vegetable frequency (number of times eaten) and variety (number of different types eaten) in the past 24 h, using the Children’s Dietary Questionnaire. Children (n 4981, mean 7·36 (sd 2·90) years) ate vegetables 2·10 (sd 1·11) times and fruits 2·35 (sd 1·14) times and ate 3·21 (sd 1·35) different vegetables and 2·40 (sd 1·18) different fruits, on average. Compared with breast-feeding for <6 months, breast-feeding for ≥6 months was associated with higher vegetable variety. Compared with cereal as the first complementary food, fruits or vegetables were associated with higher vegetable frequency and variety, and higher fruit frequency. Overall, infancy is a window of opportunity for dietary intervention. Guidance to parents should encourage the use of fruits and vegetables at the beginning of complementary feeding.