In the song, released Friday, Harris sings: "Why wait to say 'At least I did it my way'/Lie awake two-faced, but in my heart I understand/I made my move and it was all about you/Now I feel so far removed/You were the one thing in my way."
Now, the Scottish producer is setting the record straight on who or what inspired the song.
"It's breaking out of a situation. I thought of the concept years ago, when I left [the grocery store] Safeway," he said Friday in an interview on "Elvis Duran and the Z100 Morning Show."
"I was trying to move to London and I was working in the store in Scotland. I was trying to go on and make music for a living but I couldn't because I didn't have any money," Harris said. "I was like, damn this grocery store! If I could break out of this I could have enough time to work on music and get good."
Harris said the song was inspired by just how hard it is to become a success in the music industry.
"It's hard to get a job in my town. You get brainwashed into thinking that's as good as you're going to get, and then you have to realize that actually there's a whole world out there," he said. "When you're stuck in that situation, you can’t see that. You don’t think that you’re going to become anything! That was just the concept that was in the back of my mind, but I had no idea how to put that into words until very recently."
Unlike his ex, Swift, 26, who has famously spoken about past relationships in her music, Harris said "that's not really my vibe."
"I'm not an autobiographical singer. I'm very vague with my messages," he said. "I don't think they're any less powerful, but there are less words in them, and I don't think over the course of an album it would really make sense with me as an artist."
"My Way" is Harris' second single, after "This Is What You Came For," that he's released since his June breakup with Swift.
ABC News confirmed the breakup after the couple celebrated their one-year anniversary by taking a tropical vacation.