Nitrogen assimilation is strictly regulated in cyanobacteria. In an inorganic nitrogen-deficient environment, some vegetative cells of the cyanobacterium Anabaena differentiate into heterocysts. We assessed the photosynthesis and nitrogen-fixing capacities of heterocysts and vegetative cells, respectively, at the transcriptome level. RNA extracted from nitrogen-replete vegetative cells (NVs), nitrogen-deprived vegetative cells (NDVs), and nitrogen-deprived heterocysts (NDHs) in Anabaena sp. strain PCC 7120 was evaluated by transcriptome sequencing. Paired comparisons of NVs vs. NDHs, NVs vs. NDVs, and NDVs vs. NDHs revealed 2,044 differentially expressed genes (DEGs). Kyoto Encyclopedia of Genes and Genomes enrichment analysis of the DEGs showed that carbon fixation in photosynthetic organisms and several nitrogen metabolism-related pathways were significantly enriched. Synthesis of Gvp (Gas vesicle synthesis protein gene) in NVs was blocked by nitrogen deprivation, which may cause Anabaena cells to sink and promote nitrogen fixation under anaerobic conditions; in contrast, heterocysts may perform photosynthesis under nitrogen deprivation conditions, whereas the nitrogen fixation capability of vegetative cells was promoted by nitrogen deprivation. Immunofluorescence analysis of nitrogenase iron protein suggested that the nitrogen fixation capability of vegetative cells was promoted by nitrogen deprivation. Our findings provide insight into the molecular mechanisms underlying nitrogen fixation and photosynthesis in vegetative cells and heterocysts at the transcriptome level. This study provides a foundation for further functional verification of heterocyst growth, differentiation, and water bloom control.