Background Cyanobacteria are photosynthetic ancient bacteria ubiquitous in terrestrial and aquatic environments. Even though they carry a photosynthesis apparatus they are known to survive in dark environments. Cyanophages are viruses that infect and lyse cyanobacterial cells, adding bioavailable carbon and nutrients into the environment. Here we present the first study that investigate the metabolic spectrum of cyanobacteria in dark and anoxic environments, as well as their associated cyanophages. We sampled surface sediments during April 2018 located along a water depth gradient of 60–210 m—representing oxic, hypoxic and anoxic conditions—in the largest dead zone in the world. We combined metagenomic and total RNA sequencing to investigate cyanobacterial taxonomy, activity and their associated cyanophages. Results Cyanobacteria were detected at all four stations (n = 3 per station) along the sampled gradient, including the anoxic sediment. Top active genera in the anoxic sediment included Anabaena (19% RNA data), Synechococcus (16%), and Cyanobium (5%). The mRNA data showed that cyanobacteria were surviving through i) anaerobic carbon metabolism indicated by glycolysis plus fatty acid biosynthesis, and ii) nitrogen (N2) fixation (likely by heterocystous Anabaena). Interestingly, cyanobacteria were also actively transcribing photosynthesis, phytochromes, and gas vesicle genes. Cyanophages were also detected at all stations, and compared to the oxic sediment had a different beta diversity in the hypoxic-anoxic sediment. Moreover, our results show that these cyanophages infect cyanobacteria affecting the photosystem and phosphate regulation of cyanobacteria. Conclusions Cyanobacteria were found to transcribe genes for photosynthesis, phytochromes, and gas vesicles and this suggests that cyanobacteria are trying to ascend to the surface waters. The difference in cyanophage beta diversity between oxic and hypoxic-anoxic sediment suggests that anaerobic cyanobacteria select for specific cyanophages. Cyanobacteria are known to fuel oxygen depleted benthic ecosystems with phosphorous (so called internal loading), and our study suggests that cyanophage-controlled lysis of cyanobacteria likely provides a source of nitrogen. Photosynthetic cyanobacteria are commonly thought to have been essential in the great oxygenation event on Earth ca. 2.4 billion years ago. Our results suggest that active cyanobacteria might also provide nutrients (via N2 fixation and viral lysis) in dark and anoxic environments.