Shakira and Piqué, who played for Barcelona, Manchester United and the Spanish national team, separated last year after more than a decade after birthing two children.
The former centre-back, 35, has since begun a relationship with a 23-year-old woman, Clara Chía.
In the diss track, a collaboration with the Argentine producer and DJ Bizarrap, Shakira, 45, sings: “I’m worth two 22-year-olds,” adding: “You swapped a Ferrari for a [Renault] Twingo/You swapped a Rolex for a Casio.”