Alex Wood, 22, who is running for office in Somerset in southwestern England, says he is actually grabbing a friend's cellphone, the BBC reported.
He said another snapshot showing him with a knife between his teeth was taken on Halloween when he was costumed as a pirate.
"You don't expect to go into politics, so it was a silly prank at the time," he said.
Wood said disparaging comments about Africans on his Facebook page had been put there by someone who "hijacked" his page. He said he reported the matter to police.
UKIP leader Nigel Farage said the offending content is probably "more about silly youthful bravado than it is a statement of political intent," but the party will investigate the matter "and if we discover that Mr. Wood has extremist links, he'll be gone."
The euro-skeptic UKIP has made considerable gains since the last general election, fueled by dissatisfaction with the governing Conservative-Liberal Democrat coalition and Britain's relationship with the European Union.
The party has expelled a number of its local candidates for anti-Semitic or extreme right-wing views or for membership in the white supremacist British National Party.
Wisconsin business offering 'therapeutic cuddling' forced to close
Ohio crash that killed two caught on camera [VIDEO]