The name originates in the northwest of the Iberian Peninsula, and is attested from the 8th century AD in the forms Didacus and Didaco. It is probably of pre-Roman origin, although neither a Basque nor a Celtic derivation is obvious. It is unattested in ancient sources. Derivation from the attested Greek name Diadochus is unlikely.
"Diego" as a generic name or term for a Spaniard is documented from around 1615, and "Dago" is used as such still in the 19th century. By the early 20th century, the term "dago" became an ethnic slur chiefly for Italian Americans, besides also for anyone of Spanish or Portuguese descent.
The patronymic for Diego is Díaz in Castillian (used for example by Rodrigo Díaz de Vivar, better known as El Cid) and Dias in Portuguese. Like many patronymics, these have become common surnames in Spanish- and Portuguese-speaking regions. The form Diéguez is much less common; Diegues can be found in Portuguese-speaking countries. de Diego and Diego can also be found as surnames.