Ricky Hayden, 27, was stabbed in Romford, east London, as he confronted machete-wielding youths with his father and brother, the Old Bailey heard.
Tommy Roome said he "pulled the knife out" when he saw Paul Hayden had a bat but never meant serious harm.
Mr Roome denies Mr Hayden's murder and the attempted murder of his father.
Tarrell Hinds denies the same charges.
The court heard the men had gone to Gibbfield Close on 13 September last year to look for two brothers, Carter and Latham Jordan, who Mr Roome was involved in an ongoing dispute with.
Giving evidence, Mr Roome said they had stopped as they thought they saw one of the Jordans' cars when he spotted three men running down the road.
He told jurors he only put his hand on the handle of his knife when he saw Paul Hayden had a baseball bat.
"He was trying to hit me. I pulled the knife out of the case. I got hit," he said.
He said he was not aware he had hit Paul Hayden and insisted he never intended to try to kill him or do him really serious harm.
"There was just blood in the road. I panicked and ran down the road," he told jurors.
The Old Bailey heard Mr Roome then could not restart the moped so he took a pedal bike which one of his friends had been riding and left.
He told the jury he later stashed the knife in a bin shed and disposed of the bike and a bloodied jumper he was wearing.
Mr Roome, also known as Aaron and from Chadwell Heath, and Mr Hinds, who is nicknamed Ghost and from Chigwell, also face an alternative charge of wounding Paul Hayden with intent.
Both deny all charges.
The trial continues.
A man accused of murdering a former celebrity bodyguard has told a court he only got out his knife because he was being threatened with a baseball bat.