J.Lo was the "22" singer's surprise guest performer during the last stop of her Red Tour at L.A.'s Staple Center.
The two dueted on Lopez's hit, "Jenny From the Block."
Swift introduced Lopez by talking about when she was a little girl.
"You know how you have your favorite song that you just play over and over and over again," she said. "You just blast it in your room and you'd sing in front of your mirror into a hairbrush, right? You have that one favorite song. It was your favorite song to dance to. Los Angeles, this is my hairbrush song."
With that, the sold-out crowd of 15,000 went crazy as they heard the opening notes of "Jenny From the Block."
Lopez appeared at the back of the stage at the top of a staircase wearing a crystal-covered sleeveless shirt and pants along with a matching baseball cap.
The duo sang and strutted around the stage surrounded by Lopez's hunky male dancers.
They ended the number with a big hug before running backstage.