The Star Trek icon played the track on talkshow Lopez Tonight after a discussion about censorship.
Host George Lopez said: "You said you had a song that you wanted to debut."
Shatner replied: "Well, we're talking about words you can't say? I'm gonna say it... I have a song and I'm just going to say the words."
The actor recently complained about the censored title of his new sitcom $#*! My Dad Says.
As well as his acting career, Shatner is famed for his cult 1968 album The Transformed Man and the critically-acclaimed Has Been recorded in 2004 with Ben Folds.
> Shatner to record 'Bohemian Rhapsody'