The 27-year-old all-rounder is accused of punching Ryan Hale, 27, to the ground and then allegedly knocking out Ryan Ali, 28, a short time later.
Stokes, Hale and Ali are jointly accused of affray - a charge they all deny - and are on trial at Bristol Crown Court.
Charges relate to an altercation in the Clifton Triangle area of the city on September 25 2017 shortly after 2am, after the three defendants left the Mbargo nightclub.
Nicholas Corsellis, prosecuting, described Stokes as being "provocative and offensive" and in an "angry state of mind" before the alleged fight.
The sportsman had been in Bristol, staying in a hotel with the England cricket team, and was in the Mbargo nightclub from about 11.30pm on September 24.
He left the club with teammate Alex Hales at 12.46am, with the pair returning and trying to re-enter at 2.08am.
Jurors were told Mbargo, as part of its licencing conditions, is unable to allow entry to additional customers after 2am and so the two cricketers were turned away.
Stokes offered door supervisor Andrew Cunningham £60, then £300, for entry, and became abusive when this was refused, the court heard.
Two gay men, Kai Barry and William O'Connor, emerged from the nightclub and began talking to Stokes and Mr Hales.
Mr Corsellis told the jury: "Mr Cunningham observed Mr Stokes's behaviour towards them.
"He noted that he was mimicking their voices and mannerisms in what he described as 'a derogatory way', thereby making fun of their camp behaviour.
"The CCTV footage, which does not have audio, suggests that sort of behaviour did take place, with Mr Stokes copying hand gestures made by the men.
"The discussion and behaviour continued but took a turn that caused Mr Cunningham some concern.
"Mr Stokes, notwithstanding his standing or occupation as a professional athlete, also smokes. He was smoking on the evening in question.
"Mr Cunningham had cause to be concerned when he saw Mr Stokes take either the unlit butt or the butt of his cigarette and flick it onto Mr O'Connor's head.
"Mr Cunningham said to Mr Stokes, 'if you want to start on anyone, start on me'."
The court heard Mr Hales had not seen Stokes flick the cigarette butt and asked Mr Cunningham why he was annoyed.
"When told by him that Stokes had flicked a cigarette at one of the men, he said: 'Stokesy - don't do that'," Mr Corsellis said.
CCTV footage shows Ali and Hale leaving the nightclub at 2.23am and engaging in conversation with Mr Barry and Mr O'Connor.
The group of four men then walked away from the club and towards Queens Road, with Stokes and Mr Hales remaining at Mbargo.
Stokes shook hands with one of the bouncers and tried to shake hands with Mr Cunningham, but this was refused.
Mr Corsellis said this "seemed to enrage Mr Stokes" and he left the nightclub angry after spending 18 minutes trying to get inside.
"Mr Stokes's behaviour outside the nightclub sets an important tone for what happened that night," he told the jury of six men and six women.
"He was clearly frustrated and annoyed. He took to acting in a provocative and offensive way towards Mr Cunningham and then Mr Barry and Mr O'Connor."
CCTV footage shows Stokes and Mr Hales catch up with Ali, Hale, Mr Barry and Mr O'Connor as they stand on Queens Road.
Mr Corsellis said it showed Mr Barry touching Ali inappropriately to his groin area, before returning and trying to take his arm.
"Mr Ali responds by pushing Mr Barry away, albeit with no significant force," he told the jury.
He told jurors it would be an issue for them to decide whether the interaction between the men had simply been "banter or something more sinister".
Only the defendants know precisely how the fight started and it could have "stopped very quickly", he claimed.
"But during the incident Mr Stokes lost his control and started to attack with revenge, retaliation or punishment in mind, well beyond acting in self defence or defence of another," Mr Corsellis said.
"He knocked Mr Hale unconscious and then - after time to pause for thought, to calm - he did exactly the same to Mr Ali.
"Mr Ali received significant injuries, including a fractured eye socket, and required hospital treatment."
Mr Corsellis described the incident as "a sustained episode of significant violence that left onlookers shocked".
He said Ali used a bottle at the beginning, with Hale bringing a street sign in at the end.
"It is with regret that these defendants are before you, for they are all young men of promise," he said.
"The defendant, Ben Stokes, is a professional cricket player who has reached the top of his profession and represented his country.
"Equally, Mr Ali has worked for the emergency services and Mr Hale has served his country in the armed forces.
"It almost goes without saying, but past success, fame or good deeds does not absolve you from your duty - and the law - to behave yourself."
Wearing a blue suit and red tie, Stokes was driven to the city's Crown Court in a silver people carrier and walked straight into the building flanked by the media.
Trial judge Judge Peter Blair QC, the Recorder of Bristol, had asked 16 potential jurors whether they were "extremely committed" cricket fans following either the England or India teams.
The potential panel were also asked whether they knew any of the three defendants and a number of other people who could be called to give evidence in the trial.
This includes Stokes's teammate Alex Hales, William O'Connor and Kai Barry, nightclub doorman Andrew Cunningham, Clifton Triangle residents Maximilian Wilson, Lauren Sweeney and Jess Thomas, and police officers.
Stokes missed the Ashes after being suspended from playing for England.
Without him, England lost the series against Australia 4-0.
He has since played in the Test series against New Zealand, Pakistan and, last week, starred as England beat India at Edgbaston.
Stokes, of Stockton Road, Castle Eden, Durham; Ali, of Forest Road, Bristol; and Hale, of Burghill Road, Westbury-on-Trym, Bristol, are on bail.