"I did not know of them before Reverend Hagee's endorsement, and I feel I must reject his endorsement as well," McCain said.
The Huffington Post report said Hagee gave a sermon in the late 1990s in which he quoted from the Bible to make the argument that God had influenced Nazism.
"'And they the hunters should hunt them' - that will be the Jews.
"'From every mountain and from every hill and from out of the holes of the rocks' - if that doesn't describe what Hitler did in the Holocaust, you can't see that," Hagee had said.
Hagee is a strong supporter of Israel and is the founder and national chairman of the Christians United for Israel group.
In his statement, McCain raised the issue of Obama's former pastor, who often delivered controversial sermons about race.
Your Views

Is race a factor in the US presidential election?

Send us your views

"I have said I do not believe Senator Obama shares Reverend Wright's extreme views.
"But let me also be clear: Reverend Hagee was not and is not my pastor or spiritual adviser, and I did not attend his church for 20 years. I have denounced statements he made immediately upon learning of them, as I do again today," McCain said.
Hagee said critics were "grossly misrepresenting my position on issues most near and dear to my heart".
"I am tired of these baseless attacks and fear that they have become a distraction in what should be a national debate about important issues," he said.
"I have therefore decided to withdraw my endorsement of senator McCain for president effective today, and to remove myself from any active role in the 2008 campaign."
Hagee had previously referred to the Roman Catholic Church as "the great whore" and called it a "false cult system".
He also has linked Hitler to the Catholic Church, suggesting it helped shape his anti-Semitism and Hagee also said Hurricane Katrina was God's retribution for homosexuality.