Cyanobacteria are ubiquitous organisms with a relevant contribution to primary production in all range of habitats. Cyanobacteria are well known for their part in worldwide occurrence of aquatic blooms while producing a myriad of natural compounds, some with toxic potential, but others of high economical impact, as geosmin. We performed an environmental survey of cyanobacterial soil colonies to identify interesting metabolic pathways and adaptation strategies used by these microorganisms and isolated, sequenced and assembled the genome of a cyanobacterium that displayed a distinctive earthy/musty smell, typical of geosmin, confirmed by GC-MS analysis of the culture's volatile extract. Morphological studies pointed to a new Oscillatoriales soil ecotype confirmed by phylogenetic analysis, which we named Microcoleus asticus sp. nov. Our studies of geosmin gene presence in Bacteria, revealed a scattered distribution among Cyanobacteria, Actinobacteria, Delta and Gammaproteobacteria, covering different niches. Careful analysis of the bacterial geosmin gene and gene tree suggests an ancient bacterial origin of the gene, that was probably successively lost in different time frames. The high sequence similarities in the cyanobacterial geosmin gene amidst freshwater and soil strains, reinforce the idea of an evolutionary history of geosmin, that is intimately connected to niche adaptation.