The song was originally released by Beyoncé on her 2013 self-titled Album. It was the lead single for the album, being released to digital resellers on December 16, 2013.
“XO” was originally written by Ryan Tedder, Terius Nash and Beyoncé Knowles.

John Mayer first covered the song in April 2014 during one of his shows in Adelaide, Australia. On May 22 he released a studio version of the song on his Soundcloud account featuring only guitar, harmonica and piano. It was made available for download from digital retailers on May 27.

Mayer later thanked Beyoncé for “her blessing” and stated the song being inspiring for his next album in “very important ways”.