The ex-spouses and 28 other stars collaborated on the song "Forever Country" in honor of the 50th anniversary of the Country Music Association Awards.
Shelton, Lambert and singers including Carrie Underwood and Tim McGraw, recorded a mashup of John Denver's "Take Me Home, Country Roads," Dolly Parton's "I Will Always Love You" and Willie Nelson's "On the Road Again." The 50th CMA Awards will take place Nov. 2.
"I really didn't even ask what the song was. I just said, 'Sure, I'd love to be a part of whatever you guys are doing,'" Shelton told E! News. "It's one of those things where you're just honored to be in with accompanying artists."
"I think country music has always been described as a family and now having been in it for 12 years, I 100 percent agree," Lambert said. "It's about the community and friends and relationships you make over the years."
Shelton and Lambert divorced in July 2015 after four years of marriage and a decade together. Shelton has since started dating singer Gwen Stefani, while Lambert is seeing Anderson East.
"I had no idea by coming to work on a fun music show they would find the loves of their life, and the light exploded and they are happier than you can imagine," he added. "We are all thrilled to be their friends and see the happiness."
Shelton last released the album If I'm Honest, which includes the song "Go Ahead and Break My Heart" featuring Stefani. Lambert, meanwhile, will release the record The Weight of These Wings on Nov. 18.