Barker announced his collaboration with the "Old Town Road" hitmaker during a sit down with Spin magazine, in which he revealed the two have been in the studio together.
"I have a song with Lil Nas X that's going to be on his EP," he told the website. "He came to the studio and I played a couple (of) beats that I thought would be stuff he was into, then I played something (by) accident where he stopped and was like, ‘What is that? I've got to have that.' "
The track is set to appear on Lil Nas X’s debut album although Barker had initially intended to feature the tune on Blink-182's forthcoming record.
"(The song) was actually an idea I had for the Blink album," he shared.
Lil Nas X's "Old Town Road", featuring country star Billy Ray Cyrus, has become only the 38th hit in U.S. Billboard history to lead the Hot 100 for 10 weeks or more.