Magnetotactic bacteria are a diverse group of microorganisms that use intracellular chains of ferrimagnetic nanocrystals, produced within magnetosome organelles, to align and navigate along the geomagnetic field. Several conserved genes for magnetosome formation have been described, but the mechanisms leading to distinct species-specific magnetosome chain configurations remain unclear. Here, we show that the fragmented nature of magnetosome chains in Magnetospirillum magneticum AMB-1 is controlled by genes mcaA and mcaB. McaA recognizes the positive curvature of the inner cell membrane, while McaB localizes to magnetosomes. Along with the MamK actin-like cytoskeleton, McaA and McaB create space for addition of new magnetosomes in between pre-existing magnetosomes. Phylogenetic analyses suggest that McaA and McaB homologs are widespread among magnetotactic bacteria and may represent an ancient strategy for magnetosome positioning.