The man - who is appearing as the prosecution's key witness in the high-profile Melbourne trial, and cannot be named for legal reasons - told the court that he shot 28-year-old sex worker Shane Chartres-Abbott near his suburban home in June 2003.
Three other men are on trial for the murder and have pleaded not guilty.
The unnamed man said he shot Chartres-Abbott after one of the accused, 42-year-old Warren Shea, told him about the escort's alleged rape of the ex-girlfriend of the second defendant, Mark Perry, 46.
"He weren't too happy about it. The Warren that I knew was a man of honour and it went against his grain. I shot Chartres-Abbott as a result of that conversation."
Speaking via videolink from prison, the man claimed that the third defendant, Evangelos Goussis, 46, was with him at the time of the shooting, Melbourne's The Age newspaper reported.
At the time of his death Chartres-Abbott was awaiting trial for the alleged rape and mutilation of the woman in 2002. The murder trial previously heard that he told her he was a 200-year-old vampire who drank blood to survive.
Chartres-Abbott had pleaded not guilty to the rape, arguing he was the victim of a bizarre counter-plot in which he was being secretly groomed by the woman for a "snuff movie" - a film showing a real-life killing - that was to end with his death.
The case continues.
