Organisers of the event at the Pentland Community Centre apologised after one firework landed amongst the remaining ones on the ground, causing the entire pile to explode at once.
As spectators ran for cover, one girl was taken to hospital after suffering a burn to her face. The police and Red Cross attended to people on the site.
Organisers have promised to review safety features after the accident.
It was estimated that £2,000 worth of fireworks went up in flames during the incident, according to BBC News.
Watch the disastrous fireworks display here:
Pentland Community Centre released a statement which read: "The management committee of PCC would like to express our sincere apologies for any upset caused following the unfortunate incident at our annual firework display on Monday (November 5) evening.
"One of the rockets misfired towards the end of the display and ricocheted into the remaining undetonated fireworks, setting them off all at once.
"This was a freak accident, and most regrettable, but this is the first incident we have had in 10 years of holding this popular community event, and we extend our apologies to everyone who was alarmed."