The Family Guy creator sang for a packed house with Ron Jones' Influence Jazz Orchestra at Vibrato.
MacFarlane is a well-known screenwriter, producer, director and actor, but few know that he can carry a tune—specifically old hits by Frank Sinatra, Dean Martin and Nat King Cole.
A source tells E! News that Theron and her boyfriend were "very close the entire evening" as they enjoyed MacFarlane's set.
But guests got an unexpected surprise when the blond beauty took the stage to sing alongside her A Million Ways to Die in the West co-star.
A candid shot of the two performing their duet onstage was posted on Instagram by Dyler Durden, which shows Theron leaning over in front of the stage.
Theron recently opened up in Vogue about how her longtime friendship with Penn turned into something romantic.
"Sean and I have known each other for eighteen years. We were just really good friends and it's been slow going because you are aware that you could screw that up and lose it," she explained.
"We had to think about it. But at the end of the day, it was somewhat effortless. It just kind of naturally happened, and before I knew it, I was in something that was making my life better—the people who really love me can see the effect it has had on me."