About 23,000 pills were taken during a raid in Waterlooville, Hampshire, by officers working for the Medicines and Healthcare products Regulatory Agency (MHRA).
MHRA is responsible for regulating all UK medicines and medical devices.
Some of the drugs were marked "herbal", but actually contained the banned pharmaceutical ingredient sibutramine.
Sibutramine was licensed as the medicine Reductil until 2010, when it was withdrawn across Europe and the US because of an increased risk of heart attacks and strokes associated with the use of the drug, the MHRA said.
The agency's head of operations, Danny Lee-Frost, said: "The action we have taken to seize these products demonstrates our total commitment to tackling this dangerous and illegal trade and to protecting patients.
"Criminals involved in the illegal supply of medical products aren't interested in your health - they are only interested in your money."
He said that the pills "may contain dangerous ingredients" and warned that the "consequences (of taking them) could be devastating".
Mr Lee-Frost added: "The internet offers access to a vast number of websites offering a wide range of products marketed as 'slimming pills' or 'diet pills'. Many make attractive claims and offer quick-fix solutions. Be aware that 'natural' doesn't always mean safe."

The top seed claimed the first set 6-3, but the Austrian saved two match points in winning a tie-break 9-7 and then took the decider 6-4.
Thiem, who beat Federer on clay last month in Rome, will play for his fourth title of the season on Sunday.
He will face either Argentina's Juan Martin del Potro or Germany's Philipp Kohlschreiber.
Thiem, 22, moved into the world's top 10 for the first time this week and wore down his 34-year-old opponent in a gripping grass-court battle, which also included two rain breaks.
Federer, who had tied with Ivan Lendl for the most wins in the open era (1,071) after his second round win against American Taylor Fritz, had missed the French Open last month with a back problem.
The defeat will be a blow to Federer as he aims to win a record eighth Wimbledon singles title later this month.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.

The Independent Police Complaints Commission (IPCC) said it was looking into more than 100 allegations.
It said complaints had been made against 42 named officers and a number of "unknown" officers.
The complaints include allegations of neglect of duty and of corruption.
In a statement the IPCC said its investigation had "expanded" since it announced in November it was investigating 10 officers involved in incidents highlighted in Professor Alexis Jay's report into child sexual exploitation (CSE) in Rotherham.
The Jay Report, published in August, found the abuse of 1,400 children in the town over a 16-year period was ignored by agencies.
The IPCC said: "Since that announcement we have received 30 complaints relating to South Yorkshire Police's handling of CSE in Rotherham.
"The complaints contain more than 100 allegations against 42 named police officers, both retired and serving, as well as a number of allegations against officers whose identities are currently unknown.
"Work to establish the identity of the unknown officers and to identify any links between the different complaints and incidents is ongoing.
"The allegations range from neglect of duty by failing to adequately investigate on the basis of intelligence or to deal with incidents appropriately, inappropriate comments and suggestions of corrupt relationships between police officers and offenders."
It said it was also investigating a claim that South Yorkshire Police "failed to act on information passed to them in 2004 and 2006 about alleged child sexual exploitation in Sheffield", in relation to two named officers who are now retired.
In a statement, the force said: "South Yorkshire Police has referred a number of allegations to the Independent Police Complaints Commission (IPCC) in relation to child sexual exploitation in Rotherham.
"We remain committed to assisting them with their independent investigation into any alleged misconduct."
Unlicensed slimming pills with an estimated value of £30,000 have been seized by enforcement officers.
[NEXT_CONCEPT]
Roger Federer was beaten by French Open semi-finalist Dominic Thiem in the Mercedes Cup semi-finals at Stuttgart.
[NEXT_CONCEPT]
The police watchdog has said it is investigating complaints against 42 South Yorkshire Police officers over the handling of child sexual exploitation in Rotherham.