Marine planktonic cyanobacteria contributed to the widespread oxygenation of the oceans towards the end of the Pre-Cambrian and their evolutionary origin represents a key transition in the geochemical evolution of the Earth surface. Little is known, however, about the evolutionary events that led to the appearance of marine planktonic cyanobacteria. I present here phylogenomic (135 proteins and two ribosomal RNAs), Bayesian relaxed molecular clock (18 proteins, SSU and LSU) and Bayesian stochastic character mapping analyses from 131 cyanobacteria genomes with the aim to unravel key evolutionary steps involved in the origin of marine planktonic cyanobacteria. While filamentous cell types evolved early on at around 2,600-2,300 Mya and likely dominated microbial mats in benthic environments for most of the Proterozoic (2,500-542 Mya), marine planktonic cyanobacteria evolved towards the end of the Proterozoic and early Phanerozoic. Crown groups of modern terrestrial and/or benthic coastal cyanobacteria appeared during the late Paleoproterozoic to early Mesoproterozoic. Decrease in cell diameter and loss of filamentous forms contributed to the evolution of unicellular planktonic lineages during the middle of the Mesoproterozoic (1,600-1,000 Mya) in freshwater environments. This study shows that marine planktonic cyanobacteria evolved from benthic marine and some diverged from freshwater ancestors during the Neoproterozoic (1,000-542 Mya).