Many of the world's 10 000 bird species lay coloured or patterned eggs. The large diversity of eggshell patterning among birds, achieved through pigment, has been attributed to a few selective agents such as crypsis, thermoregulation, egg recognition, mate signalling, egg strength and protecting the embryo from UV. Pigmentation may influence the texture of eggshells, which in turn may be important for dealing with water and microbes. We measured surface roughness (Sa, nm), surface skewness (Ssk) and surface kurtosis (Sku), which describe different aspects of surface texture, across 204 bird species with maculated (patterned) eggs and 166 species with immaculate (non-patterned) eggs. Using phylogenetically controlled analyses, we tested whether maculated eggshells have different surface topography between the foreground colour and background colour, and between the background colour of maculated eggshells and the surface of immaculate eggshells. Secondly, we determined to what extent variation in eggshell pigmentation of the foreground and background colour is determined by phylogenetic relatedness, and whether certain life-history traits are important predictors of eggshell surface structure. We show that the surface of maculated eggs consists of a rougher foreground pigment compared to the background pigment across 71% of the 204 bird species (54 families) investigated. Species that lay immaculate eggs showed no difference in surface roughness, kurtosis or skewness compared to background pigment of maculated eggs. The difference in eggshell surface roughness between foreground and background pigmentation was greater among species that occupied dense habitats, such as forests with closed canopies, compared to those that nest in open and semi-open habitats (e.g. cities, deserts, grasslands, open shrubland and seashores). Among maculated eggs, foreground texture was correlated with habitat, parental care, diet, nest location, avian group and nest type, while background texture was correlated with clutch size, annual temperature, development mode and annual precipitation. Surface roughness among immaculate eggs was greatest for herbivores, and species that have larger clutch sizes. Together, this suggests that multiple life-history traits have influenced the evolution of eggshell surface textures in modern birds.