Rodney James Bonnes (36), of no fixed abode, is charged in relation to November 2 this year.
He is further charged with grievous bodily harm with intent to a man and making a threat to kill him.
The defendant is also accused of possessing cannabis.
The case had gone ahead at court in the absence of the defendant who was due to appear via video link from Coleraine.
A defence lawyer said there had been an “incident in the cell prior to him being brought out in relation to his health”.
A police officer “strongly” opposed bail. She told the court that at 1.24am on November 2 police received a report from Ambulance Service about a male being “stabbed” at Trinity Drive in Ballymoney.
Police then received a 999 call from a man saying he had been “beaten up” by Bonnes.
Police spoke to the man, at Causeway Hospital, who had a suspected broken jaw and he said he had been assaulted and alleged the defendant “chased him out of the property with a machete”.
She said the defendant was getting surgery at Altnagelvin Hospital for his jaw which was broken in two places. The officer said police spoke to Bonnes and he was heard to say several times he was “going to kill” the injured party and whilst in custody “continued to make threats”.
The policewoman said Bonnes denied possession of the offensive weapon and assault and made a “counter allegation” but admitted threats to kill saying he was “angry” and also admitted having cannabis for personal use.
The defendant also admitted being in Joey’s Bar in Ballymoney which was in breach of bail as he was not to be in licensed premises.
The officer said Bonnes had been on bail for a “different threat to kill and threats to commit criminal damage” and had 99 previous convictions including threats to kill and “serious” assaults. The defence solicitor said Bonnes had given a “full account” to police and “denies causing any injury” to the man.
He said there was an “unidentified third unknown male” at the property. The police officer said Bonnes admitted kicking the injured man “once in the groin area during an altercation”.
The lawyer said Bonnes had been in Derry/Londonderry for a Probation appointment and met the injured party on a train.
The lawyer said the injured party was unknown to Bonnes but was known to Bonnes’ girlfriend, with whom the defendant resides. The lawyer said they all had gone back to the woman’s flat and Bonnes had alleged the injured party said “somebody is going to call up and he is going to buy drugs of him and when the person comes he is going to rob him.
“Mr Bonnes says ‘Don’t be doing that’ and an argument then ensues between the pair. “
The defence man said the injured party then lifted items and used them against Bonnes, who sustained injuries.
District Judge Nigel Broderick refused bail and the case was adjourned to Coleraine Magistrates Court on November 22.