Type IV pili are important virulence factors on the surface of many pathogenic bacteria and have been implicated in a wide range of diverse functions, including attachment, twitching motility, biofilm formation, and horizontal gene transfer. The respiratory pathogen Streptococcus pneumoniae deploys type IV pili to take up DNA during transformation. These competence pili are composed of the major pilin protein ComGC and exclusively assembled during bacterial competence, but their biogenesis remains unclear. Here, we report the high resolution NMR structure of N-terminal truncated ComGC revealing a highly flexible and structurally divergent type IV pilin. It consists of only three -helical segments forming a well-defined electronegative cavity and confined electronegative and hydrophobic patches. The structure is particularly flexible between the first and second -helix with the first helical part exhibiting slightly slower dynamics than the rest of the pilin, suggesting that the first helix is involved in forming the pilus structure core and that parts of helices two and three are primarily surface-exposed. Taken together, our results provide the first structure of a type IV pilin protein involved in the formation of competence-induced pili in Gram-positive bacteria and corroborate the remarkable structural diversity among type IV pilin proteins.