The singer spotted the rap mogul in the audience at the after party for her final "All I Have" show at the Zappos Theatre in the Planet Hollywood resort and pointed him out to fans and celebrity friends.
Jennifer then sang to Diddy, who was known as Puff Daddy when they dated around the turn of the century - from 1999 until 2001.
Hugging her ex, she continued serenading him, while making it clear that she knew her current beau, Alex Rodriguez, was watching her every move.
During the show, she also performed a tribute to her twins, Emme and Max.
Jennifer was also joined by her 10-year-old son and daughter, her niece, Lucie Wren Lopez-Goldfried, and Alex Rodriguez's daughters Natasha and Ella at the bash.
The show brought an end to the hit, sold out residency that began at the Planet Hollywood Resort And Casino in January, 2016. More than 500,000 fans attended the shows, which raked in over $100 million.
Gwen Stefani is now the residency queen at the same venue, after starting her run of shows at Planet Hollywood in June.