However, they always remained that they were "just friends".
Although there were signs that something nasty went down between the pair, when Selena wasn't in the music video, and Charlie admitted that they don't talk anymore (pun intended).
He even unfollowed Selena on Instagram at one point of time.
Now, fans noticed that Charlie used a Selena Gomez lookalike in his new music video for "How Long", which Puth is known to do with girls he's had a ~thing~ with... (aka, the Bella Thorne lookalike in "Attention").
And just as fans expected, Charlie is now admitting the truth. Opening up to Billboard, he explained...
"It's about a particular moment in my life, when someone very close to me wanted the attention of somebody else," he said.
"When I found that out and we ended it, I might have done some shady things too, and she might has asked me, 'How long has this been going on?'"
As for dating Sel, he explained, "I don’t kiss and tell, but the only way a song like that can come across as real is if there’s something else going on behind the scenes.
"And that’s what was happening [with Selena]."
He continued that the experienced was "very short-lived, very small, but very impactful. And it really messed me up. I’m trying to put this the best way possible: It wasn’t like I was the only person on her mind. And I think I knew that going in — what I was getting myself into ... And she evoked such good emotion on that song, it was a pleasure working with her. That’s why I’m always happy to sing it, even though it came from a dark point in my life."
Some fans weren't so pleased.
"Charlie Puth made a song with Selena for only two damn weeks, that was 2 years ago. He more effected off that than Abel was dating Selena for 10 months. LMFAOOO LIKE BOY, PLS SIT TF DOWN," one person wrote. Another tweeted, "Charlie Puth really wrote 2 songs about Selena after spending 2 Weeks with her lol know wonder he thought him and Bella Thorne were dating."
But of course, he also had his supporters defending him.
Watch the film clip for "How Long" below: