'Lonely Planet' is described as a "rock ballad", and will be performed in Sweden by Armenian act Dorians.
Iommi is known in Armenia for his work producing a charity album after a massive earthquake in 1988.
The metal musician revealed that writing a Eurovision song has been a "new experience".
"I've done a lot of things, but never that," he is quoted as saying by BBC News.
"The thing is, I've always thought, 'Oh no, not the Eurovision', and here I am in it now."
Iommi helped raise funds in Armenia following the 1988 Spitak earthquake, which killed around 45,000 people and left 500,000 homeless.
He explained that he went back to the country a few years ago with Queen's Brian May to follow up on the work done in the country. The pair have since started a new campaign to rebuild a music school.
Representatives of the Armenian Eurovision entry spoke to Iommi about writing a song following his charity work.
"I first said, 'Oh God, I don't know' - it seemed really strange, me doing a Eurovision song, I don't usually do that," he explained.
"But I said, 'I've got a rock ballad, I'll send it over'."
Iommi added that he "really" hopes 'Lonely Planet' performs well in the contest, but said he expects it to be "slagged [off] like everything else".
The guitarist revealed last year that he was undergoing treatment for cancer after being diagnosed with lymphoma.
Black Sabbath will release their long-awaited new album 13 later this year.
The 58th annual Eurovision Song Contest will take place in Malmö between May 14 and 18.
Photo gallery - 2012's Eurovision Song Contest:
Copyright: Sergey Ponomarev/AP/Press Association Images