Type 2 diabetes (T2D) is associated with dyslipidemia and mild cognitive impairment. This study investigated the relationships between serum lipids metabolism, cognition, and functional connectivity (FC) within and between brain networks in T2D patients. The study included 102 T2D patients and 45 healthy controls who underwent functional magnetic resonance imaging, lipid profile tests, and cognitive assessments. Thirteen functional networks were identified using independent component analysis. The statistical analyses included multivariate analysis of covariance, partial correlation, canonical correlation, and mediation analyses. We found widely reduced between-network FCs in T2D, especially between the ventral sensorimotor network (SMN) and dorsal attention network (DAN) (p = 0.001) and between the ventral SMN and lateral visual network (VN) (p < 0.001). Moreover, lower between-network FCs were correlated with worse serum lipids metabolism and poorer cognitive performance (all p < 0.05). Importantly, between-network FCs mediated the relationship between lipid metabolism and cognition (β = −0.3136, 95% CI: −0.7660, −0.0186). Within-network analyses revealed altered FCs within the anterior default mode network, DAN, and lateral VN, each positively correlated with global cognition (all p < 0.01). Our results suggest the potential of improving cognitive function by regulating serum lipids in individuals with T2D.