The Skyscraper hitmaker reveals she called Azalea and proposed the idea over the phone, and she was blown away by the hip-hop star's immediate response.
She tells MTV News, "When we finally made the decision of which songs were making the album I said, 'OK, I want her on this one.' So I called her and was like, 'Hey will you do a song?' And she's like, 'Yeah sure I'll go into the studio tonight.'
"I was like, 'Do you want to hear it first?' She's like, 'No it's cool.' I'm like, 'You're an amazing friend and I love you.'"
The pair performed the collaboration for the first time as part of the MTV Video Music Awards in Los Angeles on Sunday (30Aug15), and Lovato reveals she had been plotting the collaboration for a while, and she was glad their sounds "really meshed well".
She tells Billboard magazine, "I wanted her (Azalea) to be on this album from the first time that I heard that song, even before we knew each other. And then we became good friends, and so it was kind of a situation where it was like, 'We have to work together'."
She and Azalea have become such close pals, Lovato will serve as one of the rapper's bridesmaids when she marries basketball star Nick Young next year (16). Lovato was in attendance when the Los Angeles Lakers player proposed to Iggy at his 30th birthday party in June (15).