The plant growth-promoting bacterium Azospirillum brasilense contains several genes encoding proteins involved in the biosynthesis and degradation of the second messenger cyclic-di-GMP, which may control key bacterial functions, such as biofilm formation and motility. Here, we analysed the function and expression of the cdgD gene, encoding a multidomain protein that includes GGDEF-EAL domains and CHASE and PAS domains. An insertional cdgD gene mutant was constructed, and analysis of biofilm and extracellular polymeric substance production, as well as the motility phenotype indicated that cdgD encoded a functional diguanylate protein. These results were correlated with a reduced overall cellular concentration of cyclic-di-GMP in the mutant over 48 h compared with that observed in the wild-type strain, which was recovered in the complemented strain. In addition, cdgD gene expression was measured in cells growing under planktonic or biofilm conditions, and differential expression was observed when KNO3 or NH4Cl was added to the minimal medium as a nitrogen source. The transcriptional fusion of the cdgD promoter with the gene encoding the autofluorescent mCherry protein indicated that the cdgD gene was expressed both under abiotic conditions and in association with wheat roots. Reduced colonization of wheat roots was observed for the mutant compared with the wild-type strain grown in the same soil conditions. The Azospirillum-plant association begins with the motility of the bacterium towards the plant rhizosphere followed by the adsorption and adherence of these bacteria to plant roots. Therefore, it is important to study the genes that contribute to this initial interaction of the bacterium with its host plant.