This is the second single from Shakira's third English-language studio album She Wolf in all territories apart from the US. A Spanish version of this song titled "Lo Hecho Está Hecho" was also released.
The song was co-produced and co-written by Neptunes record-producer Pharrell Williams. Shakira said of Pharrell to MTV News: "He comes up with ideas, and he executes them immediately. It's really cool, because I'm a little bit slower, and he's the man with the big strokes, and he really comes with great ideas. It was a great synergy."
The musical arrangement incorporates the rhythms of Brazilian samba and fast-paced drums. It is typical of the album, which features a selection of electronic pop songs with various world music textures. Shakira told Billboard: "I felt very curious and intrigued about the electro-pop world and everything it has to offer. I wanted to make sure that this album was very bassy and that the kicks hit really hard, and I wanted to concentrate on the beat. But my music, to a certain extent, is very complex - because I always try to experiment with sounds from other parts of the world."
British director Sophie Muller ("Hips Don't Lie") tapped into a range of influences for the music video, including 19th-century paintings, Turkish bathrooms, and Icelandic dances. Shakira explained the video to MTV News: "It was a collaboration between this friend of mine who's a dancer, and me. She showed me this contemporary dance piece that was produced in Iceland. So we said, 'Hey, maybe we could do something like this for 'Did It Again.' So we brought this choreographer from Iceland from this contemporary dance company, and we worked on this piece. And I decided to bring a little bit of this painter, [Lawrence] Alma-Tadema, who portrays women in these bathrooms, these Turkish bathrooms, and I wanted to bring a little bit of that poetic imagery to this video," she continued. "And I remember not too long ago having watched a few women turn their heads in a trans in Morocco. So we brought all these pieces - Moroccan women twirling and turning their heads, and the poetry from Alma-Tadema's paintings, plus this Icelandic contemporary dance piece - and we mixed all these pieces together for the video."