On October 19, 2002, LL Cool J revealed that he had just recorded a song for Lopez's then-upcoming album two days prior, saying:
"We did a new song for her album. Well it's actually going to be her next single, I think – it's a lot of fun, a lot of fun." He stated that, "It's got like a mid-tempo beat, pretty melody, you know what I'm saying. I'm rapping, she's singing. We go back and forth with stuff. It's kind of cool, it's fly."
Initially, Lopez did not want "All I Have" to be released as a single, as she believed it was too musically similar to her previous singles such as "Ain't It Funny" and "I'm Real"; she felt like she was "visiting old territory".
"Those tracks were like a different era for me, and I didn't want people to perceive it like I'm just trying to capitalize on the same thing. But the record company was like, 'Who cares what they think, those are hits mama!'".
Lopez, who said she "calls the shots", eventually agreed.
The song was officially sent to urban radio in the United States on December 14, 2002, as the second single from This Is Me... Then.
"All I Have" entered the US Billboard Hot 100 at number 25, earning the "Hot Shot Debut" of the week. It not only became the highest-debuting song of Lopez's career at the time but was also the highest-debuting song on the chart since September 2001.
For the week of January 30, 2003, the single reached number one on the Hot 100, giving Lopez her fourth and LL Cool J his first number-one song on the chart.
On November 14, 2022, JLo shared a lil throwback video of their time together writing and recording the song on her Facebook page.