Timberlake, 35, was at the Mount Washington Hotel in New Hampshire, where Chelsey Gaudet and Ryan Parks were having their wedding reception, reported ET online.
The father of the bride saw Timberlake and asked him for a favor.
"So we were taking the first look photo and all of a sudden Justin Timberlake appears out of nowhere, shakes my husband's hand and congratulates us and takes a photo. We thought it was awesome of him to do that, but had no idea it would go viral," Gaudet said.
Back in June, Taylor Swift made a surprise appearance at one of her fan's weddings in New Jersey.