Jennifer Lopez said Monday that she felt a responsibility to record Love Make the World Go Round, which honors the victims of a mass shooting in Orlando.

Forty-nine people died and dozens were injured last month when a lone gunman opened fire in Pulse, a gay nightclub.

Lopez collaborated on the song with Lin-Manuel Miranda, who is best known for writing and starring in the Broadway musical Hamilton.

All proceeds from Love Make the World Go Round will benefit the Hispanic Federation's Proyecto Somos Orlando, which, according to the group's website, will “provide bilingual culturally-competent social services to impacted families and the broader community.”

The duo performed the song live Monday on NBC's Today.

I had this song, Love Make the World Go Round, for eight months and because of what happened in Orlando I heard the song in a totally different way,” Lopez told NBC News. “Yes, it was in a gay club; I have gay family members. It was Latino night there at the club; I am Latino.”

“I was thinking, this song needs to come out right now.”

Lopez added that she felt a responsibility to contribute.

Miranda agreed, calling the idea “smart,” because Lopez's music was likely playing in the nightclub on that night.