Multimorbidity has great impact on health care. We constructed multimorbidity networks in the general population, extracted subnets focused on common chronic conditions and analysed type 2 diabetes mellitus (T2DM) comorbidity network. We used electronic records from 3,135,948 adult people in Catalonia, Spain (539,909 with T2DM), with at least 2 coexistent chronic conditions within the study period (2006-2017). We constructed networks from odds-ratio estimates adjusted by age and sex and considered connections with oR > 1.2 and p-value < 1e-5. Directed networks and trajectories were derived from temporal associations. interactive networks are freely available in a website with the option to customize characteristics and subnets. The more connected conditions in T2DM undirected network were: complicated hypertension and atherosclerosis/peripheral vascular disease (degree: 32), cholecystitis/cholelithiasis, retinopathy and peripheral neuritis/neuropathy (degree: 31). T2DM has moderate number of connections and centrality but is associated with conditions with high scores in the multimorbidity network (neuropathy, anaemia and digestive diseases), and severe conditions with poor prognosis. The strongest associations from T2DM directed networks were to retinopathy (OR: 23.8), glomerulonephritis/nephrosis (OR: 3.4), peripheral neuritis/neuropathy (OR: 2.7) and pancreas cancer (OR: 2.4). Temporal associations showed the relevance of retinopathy in the progression to complicated hypertension, cerebrovascular disease, ischemic heart disease and organ failure.