The hip hop mogul sang Coming Home to judges J.Lo, Steven Tyler and Randy Jackson while flanked by two string players.
J.Lo and Diddy split in 2000 but there appeared to be no hard feelings as J.Lo, 41, smiled broadly and gave her old love some rapturous applause. However, Aerosmith frontman Tyler was the only one of the judges to go all out with a standing ovation.
After the song, host Ryan Seacrest took the Bad Boy rapper over to the finalists so he could give them advice.
'I would say you get out of life what you put into it,' Diddy, 41, told them.
'You have to keep on practicing, keep on rehearsing. Keep God first in your life and don't stop. Don't ever stop.'
Also in the show, J-Lo again appeared near tears as she had to deliver the news to Ashton Jones that she was the first finalist being kicked out.
'Not this time, baby, I'm sorry. It was unanimous,' she told her, clearly upset.
Meanwhile actress Amanda Seyfried was in the audience and interviewed by host Ryan Seacrest.