North Yorkshire Council's trading standards team prosecuted Fast Line Imports Ltd, which is based in Cheshire, after seizing the fireworks in Scarborough.
The trading standards officers said the 'throwdown' type fireworks contained an unknown explosive ingredient, not the one listed on the label, and also exceeded noise limits.
This meant the items were wrongly labelled with a CE safety mark, used to confirm that goods comply with safety regulations
Fast Line Imports Ltd admitted three offences under the Pyrotechnic Articles (Safety) Regulations 2015 Act in a hearing at York Magistrates Court.
It was fined £39,000 and ordered to pay costs of £2,245.
Trading standards officers issued a suspension notice preventing the product from being sold or supplied but the company failed to tell officers which wholesalers it had previously distributed the product to, meaning a complete withdrawal from sale could not happen.
Magistrates who heard the case said: “It beggars belief that you failed to co-operate with trading standards."
They also said the product “presented a significant risk”.
North Yorkshire County Council’s executive member for trading standards, Coun Derek Bastiman, said: “A business that imports fireworks into the UK bears responsibility for ensuring that they are safe and meet safety and labelling standards.
“This company did not complete the appropriate steps to check the throwdowns were safe and then failed to assist the council’s officers in removing the product from the market.
“This is disappointing and irresponsible and the court recognised that in the sentence it passed today.”
Anyone who sees fireworks on sale which they are concerned about they can report them to trading standards officers via the Citizens Advice Consumer Service on 0808 223 1133.