Jason Bryden, also known as Jason Dunlop, died on Tuesday, three days after being attacked at his home in Hareshaw Gardens in the town on Saturday night.
John Clark, 38, and James Clark, 36, appeared at Kilmarnock Sheriff Court charged with murder and assault.
They made no plea or declaration and were remanded in custody.
They are expected to appear in court again next Friday.
The pair, from Kilmarnock, are also accused of attempting to defeat the ends of justice.
Two men have appeared in court charged with the murder of a 38-year-old man in Kilmarnock.