Women with gestational diabetes mellitus (GDM) and obesity experience lower rates of breastfeeding. Little is known about breastfeeding among mothers with type 2 diabetes. Australian Indigenous women have a high prevalence of type 2 diabetes in pregnancy. We aimed to evaluate the association of hyperglycaemia, including type 2 diabetes, with breastfeeding outcomes. Indigenous (n = 495) and non-Indigenous (n = 555) participants of the Pregnancy And Neonatal Diabetes Outcomes in Remote Australia (PANDORA) cohort included women without hyperglycaemia in pregnancy (n = 222), with GDM (n = 684) and with type 2 diabetes (n = 144). The associations of hyperglycaemia in pregnancy and breastfeeding at hospital discharge, 6weeks and 6months post-partum were evaluated with logistic regression, after adjustment for maternal obesity, ethnicity, maternal and neonatal characteristics. Indigenous women were more likely to predominantly breastfeed at 6weeks across all levels of hyperglycaemia. Compared with women with no hyperglycaemia in pregnancy, women with type 2 diabetes had lower odds for exclusive breastfeeding at discharge (adjusted OR for exclusive breastfeeding 0.4 [95% CI 0.2, 0.8] p = 0.006). At 6weeks and 6months, the relationship between type 2 diabetes and predominant breastfeeding was not statistically significant (6weeks 0.7 [0.3, 1.6] p = 0.40, 6months 0.8 [0.4, 1.6] p = 0.60). Women with gestational diabetes were as likely to achieve predominant breastfeeding at 6weeks and 6months as women without hyperglycaemia in pregnancy. Indigenous women had high rates of breastfeeding. Women with type 2 diabetes had difficulty establishing exclusive breastfeeding at hospital discharge. Further research is needed to assess the impact on long-term breastfeeding outcomes. Graphical abstract.