Meghan Trainor Talks About the Guy She Met on Instagram that Inspired Her New Song

This video is unavailable because we were unable to load a message from our sponsors.

If you are using ad-blocking software, please disable it and reload the page.

Meghan Trainor gave her first television performance since undergoing vocal surgery, and admitted that a guy she was talking to in that time did inspire her new song, "Lead Me On."

Trainor told Ellen DeGeneres on her Wednesday show that she realized while on tour that it hurt to speak. After a doctor explained that she would have to go four months without talking in order to heal her voice, the "All About That Bass" singer opted for surgery. She still had to go without speaking for two weeks, and in that time used texting and social media to communicate.

WATCH: Meghan Trainor Plays 'All About That Bass' on the Ukulele

"I had an app that texts to speech, so you can type in stuff and you can speak like a robot," Trainor said. "I went painting a lot."

DeGeneres then asked about the rumor that the GRAMMY nominee met "a boyfriend on the Internet."

Trainor played coy about her relationship status, but did admit that there was a guy she was talking to on social media. "It was a guy that I Instragrammed, and I didn’t put a caption so the whole world freaked out, a.k.a. all my Megatrons," she recalled. "All the fans they were like, 'What is this?'"

MORE: Meghan Trainor Cancels Tour -- 'I Am Devastated, Scared and So Sorry'

DeGeneres pressed Trainor for more details until she confessed, "It was just a little nothing. Nothing. But I did get a great song out of it. I wrote a smash out of it."

The 21-year-old entertainer performed her new song on Ellen, revealing that the inspiration came from something the guy said. "It was really sweet. He said [something] like, 'I never intended to lead you on,'" Trainor said. "So, that was like the main hook."

WATCH: Meghan Trainor Reveals Her Dad Told Her Boys Like More Booty at Night

Trainor has been very candid about the ups and downs of her love life. The pop star recalled to ET a particularly heartbreaking exchange she had with a guy in her younger years.

"I did have this one boy come up to me, who, like I loved him, I was so in love, And he told me, 'You'd be like real hot if you were 10 pounds lighter,'" she said. "I was like, 'Ugh, that's it! I am going to cry all day and not eat for the rest of the day.'"

Related Gallery