Biological nitrogen fixation, the conversion of atmospheric nitrogen to ammonia for biosynthesis, is exclusively performed by a few bacteria and archaea. Despite the essential importance of biological nitrogen fixation, it has been impossible to quantify the incorporation of nitrogen by individual bacteria or to map the fate of fixed nitrogen in host cells. In this study, with multi-isotope imaging mass spectrometry we directly imaged and measured nitrogen fixation by individual bacteria within eukaryotic host cells and demonstrated that fixed nitrogen is used for host metabolism. This approach introduces a powerful way to study microbes and global nutrient cycles.