Nitrogen-fixing cyanobacteria bind atmospheric nitrogen and carbon dioxide using sunlight. This experimental study focused on a laboratory-based model system, Anabaena sp., in nitrogen-depleted culture. When combined nitrogen is scarce, the filamentous prokaryotes reconcile photosynthesis and nitrogen fixation by cellular differentiation into heterocysts. To better understand the influence of micronutrients on cellular function, 2D and 3D synchrotron X-ray fluorescence mappings were acquired from whole biological cells in their frozen-hydrated state at the Bionanoprobe, Advanced Photon Source. To study elemental homeostasis within these chain-like organisms, biologically relevant elements were mapped using X-ray fluorescence spectroscopy and energy-dispersive X-ray microanalysis. Higher levels of cytosolic K+, Ca2+, and Fe2+ were measured in the heterocyst than in adjacent vegetative cells, supporting the notion of elevated micronutrient demand. P-rich clusters, identified as polyphosphate bodies involved in nutrient storage, metal detoxification, and osmotic regulation, were consistently co-localized with K+ and occasionally sequestered Mg2+, Ca2+, Fe2+, and Mn2+ ions. Machine-learning-based k-mean clustering revealed that P/K clusters were associated with either Fe or Ca, with Fe and Ca clusters also occurring individually. In accordance with XRF nanotomography, distinct P/K-containing clusters close to the cellular envelope were surrounded by larger Ca-rich clusters. The transition metal Fe, which is a part of nitrogenase enzyme, was detected as irregularly shaped clusters. The elemental composition and cellular morphology of diazotrophic Anabaena sp. was visualized by multimodal imaging using atomic force microscopy, scanning electron microscopy, and fluorescence microscopy. This paper discusses the first experimental results obtained with a combined in-line optical and X-ray fluorescence microscope at the Bionanoprobe.