The "Ain't Your Mama" singer surprised fans at Anthony's concert inside New York City's Radio City Music Hall Saturday night, performing their 1999 duet, "No Me Ames."
Fans cheered as Lopez, 47, smiled at her ex-husband, from whom she split back in 2012 after nearly eight years of marriage and two children, 8-year-old twins Max and Emme. The two even held hands, danced and hugged during their performance.
Anthony, 47, called Lopez "The Queen!" right before she ran offstage.
On Instagram, the two reflected on the performance.
Lopez, who shared a photo of the two onstage, said in a caption: "Always fun sharing the stage w this one... @marcanthony #NoMeAmes #radiocitymusichall #familia."
Meanwhile, Anthony shared behind-the-scenes photos of himself with Lopez, their two children and other family members.
In a caption he wrote, "#MiGente, thank you to the fans and @jlo for a wonderful concert. #AllAboutFamily backstage last night at @radiocitymusichall #ThePrivateCollection #Tour2016."