Singer-songwriter Robin Thicke hit it big last year with "Blurred Lines." But now, Thicke is saying he didn't actually write the song.

Thicke's testimony, in the form of a deposition, was revealed in court Monday as part of a legal battle between Thicke and Marvin Gaye's family, who claim Thicke ripped off Gaye's "Got to Give it Up." The testimony revealed some shocking details.

As to why he didn't write "Blurred Lines"? Well, he told the court, "I was high on Vicodin and alcohol when I showed up at the studio." In fact, he went on to say, "I was high and drunk every time I did an interview last year."

>> Read more trending stories

It was a pretty surprising testimony to say the least, and the 37-year-old says it was actually Pharrell who wrote the song. Thicke also went on to say he's kicked his drug and alcohol problem lately and has been sober for two months. (Video via Interscope Records / Robin Thicke)

It's been a bit of a rough and interesting road for Thicke ever since "Blurred Lines" hit the top of the charts in the summer of 2013.

Interesting mainly because of, well, you know, this from the 2013 MTV Video Music Awards.

But more so rough as Thicke's been sued by Marvin Gaye's family for "stealing" the song, admitted to a drug problem, and was left by wife Paula Patton after nine years of marriage. That's all in the last year.

In fact, Patton's been the subject of many of Thicke's recent songs. In the deposition Monday, Thicke said that Patton left him not because of cheating but because he told her "the truth," though he didn't seem to elaborate on what "the truth" was.

In Pharrell's deposition, also released Monday, he admitted "Blurred Lines" was mostly his creation but gave credit to Thicke, saying, "It wouldn't be what it was — what it is today" if Thicke hadn't sung it.

This video includes images from Getty Images.