The 44-year-old singer, who is back on the upcoming 14th season of the singing reality show, was asked by a young male contestant to shake a leg with him, as seen in a video clip released online.
Lopez is seen resting her head on the contestant's shoulder, as he sings Sam Smith's 'Stay With Me', while fellow judges Harry Connick, Jr joins in on piano and country singer Keith Urban takes hold of the man's guitar and strums along while singing harmonies.
"Thank you! This is so sweet. That's the most fun I've had in months!" Lopez said after the statement.
The 14th season of American Idol kicks off in January next year.