Worldwide star Stokes and Ryan Ali, both 27, are being tried for affray over a brawl that erupted in Bristol, southwest England, in the early hours of September 25 last year.The cricketer faced cross-examination from the prosecutor Nicholas Corsellis on the fifth day of the trial at Bristol Crown Court.
"I can't recollect the direct words, but I'm very clear the words used were of homophobic abuse", Stokes said.
The Durham county cricketer is on trial alongside Mr Ali, who Mr Stokes is alleged to have knocked out during the brawl near the nightclub.
Giving evidence for a second day, Stokes explained he had drunk a bottle of beer immediately after the one-day worldwide win against the West Indies and then had two or three pints back at the hotel over dinner.
Mr Ali denied being the "initial aggressor" in the incident and replied "definitely not" when asked if he had been looking for a fight.
In a cross-examination on Day 5 of the trial at the Bristol Crown Court on Friday (August 10), Ben Stokes was accused of over-exaggerating the turn of events from last September that landed him in a legal wrangle.
Mr Corsellis asked: "You don't remember any of the words of the homophobic abuse that you assert took place". Is that because you were really very drunk?
"It is not a question of your memory being affected by injury, you were uninjured from the cricket match you played that day".
Mr Corsellis told him he was lying to the jury.
"I don't remember every little detail which has gone on that night".
The cricketer told the court he had not mocked or been homophobic towards Barry and O'Connor when talking with them outside Mbargo, where he and fellow cricketer Hales had been refused re-entry.
Stokes and Ali deny affray.
Mr Corsellis asked: "Were you enraged?"
"You know you were angry and this CCTV was you looking angry, isn't it?"
"I was told by Mr Ali along the lines of "Shut the f*** up or I will bottle you". [I] had to make the judgement I did at the time", Stokes said.
Asked why Mr Stokes may have charged towards him, Mr Ali replied: "I have no idea". And when asked to whom he might be speaking, Stokes replied "God".
Corsellis asked Stokes if he had a "significant memory blackout" from the night in question.
Stokes replied: "You could say that, yes".
The prosecutor suggested that Stokes's eyes were "glazed" and his speech was slurred in footage recorded on a body camera worn by a police officer when he was arrested, which the cricketer denied.
The court then heard a written statement from Nottinghamshire and England's Jake Ball - and read by Stokes' QC, Gordon Cole - which described Stokes as in "a good mood".
When the prosecutor asked what Stokes was looking at, he said: "I might just be looking at the night sky".
"I saw that as an opportunity to try to restrain Mr Stokes to prevent him from attacking my friend who was laid unconscious on the floor".