Three explanations are given for the name of Veglie. The first is Greek-Byzantine: Elos, the marsh. The second is Latin: Velio, or Velia, a common name in Roman onomastics. The third was put forward by Francesco Ribezzo, and points to a pre-Messapian root, vel, of Mediterranean origin, meaning height — and it is the only one of the three that can be checked on the spot, because the historic core of Veglie really does stand on a slight rise. The town was founded around the tenth century, and it was probably a refoundation by the Byzantine emperor Nicephorus Phocas after the Saracen destructions: it was repopulated with a small colony of Greeks, whose presence is documented until the fourteenth century.
Veglie was part of the county of Copertino, and its history is the history of those walls. The first to attempt to fortify the Terra Veliarum was the French knight Tristan of Clermont; then, in 1498, the Castriota Granai remade the circuit and rebuilt the main gate, which for that reason is called Porta Nuova, the work entrusted to the military architect Evangelista Menga. In 1557 the county was bought by the Squarciafico, a family of Genoese merchants. The arms tell the rest: there is a bombard, chosen in the seventeenth century by the feudal lords as a symbol of strength, to which in the second half of the nineteenth century three cannonballs were added; there was also a star, which the grant decree did not carry over, and until 1943 the shield was surmounted by a marquis's crown, referring to a Squarciafico made marquis of Galatone by the king of Spain. Until 1927 Veglie belonged to the new province of Brindisi, and that year it returned to the province of Lecce. And it has an abandoned hamlet, Monteruga.