"There was an attack on Buratai late Friday by gunmen suspected to be insurgents....They beheaded 23 people and set homes on fire," said Mohammed Adamu, who represents the town some 200 kilometres from Borno's capital Maiduguri.
"At least half the village has been burnt," he added.
A nurse at the nearest major hospital, in Biu, said the 32 injured who were receiving care also reported that many were decapitated during the attack.
It was not clear if the raid late Friday was linked to Saturday's polls, but Boko Haram leader Abubakar Shekau had vowed to disrupt the vote.
Elsewhere in Nigeria's restive northeast, suspected Islamist militants killed at least seven people in separate attacks in the Gombe state.
Witnesses reported that the assailants in Gombe made clear their intention was to disrupt the polls.