The genome of about 10% of bacterial species is divided among two or more large chromosome-sized replicons. The contribution of each replicon to the microbial life cycle (for example, environmental adaptations and/or niche switching) remains unclear. Here we report a genome-scale metabolic model of the legume symbiont Sinorhizobium meliloti that is integrated with carbon utilization data for 1,500 genes with 192 carbon substrates. Growth of S. meliloti is modelled in three ecological niches (bulk soil, rhizosphere and nodule) with a focus on the role of each of its three replicons. We observe clear metabolic differences during growth in the tested ecological niches and an overall reprogramming following niche switching. In silico examination of the inferred fitness of gene deletion mutants suggests that secondary replicons evolved to fulfil a specialized function, particularly host-associated niche adaptation. Thus, genes on secondary replicons might potentially be manipulated to promote or suppress host interactions for biotechnological purposes.