Timberlake ran into the group when they were recording their new LP "Concrete and Gold" at EastWest studios in Los Angeles.
He quickly hit it off with frontman Dave Grohl, prompting him to ask if he could add his vocals to one of their songs so he had something to boast about to his friends, reported Rolling Stone.
"We'd drink whiskey in the parking lot. He was really, really cool. Then the night before his last day, he says, 'Can I sing on your record? I don't want to push it, but - I just want to be able to tell my friends'?" Grohl said of Timberlake.
"He nailed it. I'm telling you - the guy's going somewhere," Grohl said.
And Timberlake isn't the only famous star to appear on the record because Grohl asked his friend Paul McCartney to play drums on one track after the Beatles legend requested to work with their producer, Greg Kurstin, during their recording sessions.