Stokes, acting in "revenge, retaliation or punishment", was involved in a "sustained episode of significant violence", prosecutor Nicholas Corsellis told a jury at Bristol Crown Court in southwest England.
Stokes, 27, who starred on Saturday as England beat India at Edgbaston, is being tried alongside 27-year-old Ryan Ali and Ryan Hale, 28. They each deny the charge of affray.
They had all been drinking inside a Bristol nightclub. The fight took place outside after 2:00 am on September 25 last year, the prosecutor said.
They were all involved in threatening and/or using unlawful violence towards each other, it is alleged.
Corsellis said only the defendants knew how the fracas began and it could have been stopped very quickly.
"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," he 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 included a fractured eye socket and required hospital treatment."
- 'Onlookers shocked' -
Wearing a blue suit and red tie, Stokes sat in the far left of the dock, Hale in the middle and Ali on the far right.
"This was not a trivial moment of unpleasantness. It was a sustained episode of significant violence that left onlookers shocked at what was taking place," Corsellis said.
"A bottle was used at the beginning by Mr Ali and a broken street sign brought into the fray towards the end by Mr Hale."
The prosecutor said the three defendants were all young men of promise.
"Ben Stokes, is a professional cricket player who has reached the top of his profession and represented his country," Corsellis said.
"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."
Stokes missed the Ashes series against Australia after being suspended from playing for England. Without him, England lost the series 4-0.
He has since played in the Test series against New Zealand and Pakistan. He starred in England's first Test victory over India last week.
The trial is expected to last between five and seven days.
The second Test between England and India, at Lord's in London, starts on Thursday.
First Published: August 6, 2018, 6:31 PM IST