The vehicle was found shortly before 01:40 BST at Waterglade Industrial Park in Grays, police said. Essex Police said the trailer has been moved to a secure location where the bodies of those inside – a teenager and 38 adults – can be recovered.
The driver, named locally as Mo Robinson, 25, from Portadown, County Armagh, Northern Ireland, has been arrested on suspicion of murder.
Essex Police said the trailer arrived via ferry from Zeebrugge, Belgium, into Purfleet on the River Thames.
The ship docked in the Thurrock area shortly after 00:30, the force said.
It is believed the lorry then left the port about 35 minutes later.
Deputy Chief Constable Pippa Mills said identifying the victims remained a “number one priority”, but was expected to be a “lengthy process”.
The National Crime Agency said it had sent officers to assist and identify any “organised crime groups who may have played a part”.
Richard Burnett, chief executive of the Road Haulage Association, said the trailer appeared to be a refrigerated unit, where temperatures could be as low as -25C.
He described conditions for anyone inside as “absolutely horrendous”.
A spokesman for the Bulgarian foreign affairs ministry confirmed the truck was registered in the country.
“The Scania truck was registered in Varna (on the east coast) under the name of a company owned by an Irish citizen,” he said.
“Police said that it is highly unlikely that they are Bulgarians,” he added.
Police have appealed for witnesses and anyone with information about the lorry’s route to contact them.
The force said it believed the tractor unit – or front part – of the lorry had come from Northern Ireland.
Prime Minister Boris Johnson said it was an “unimaginable tragedy and truly heartbreaking”.
Speaking at Prime Minister’s Questions, he said: “I know that the thoughts and prayers of all members will be with those who lost their lives and their loved ones.
“I’m receiving regular updates. The Home Office will work closely with Essex Police as we establish exactly what has happened.”
‘Contempt for life’
Home Secretary Priti Patel said she was “shocked and saddened”, while Thurrock MP Jackie Doyle-Price said it was “sickening news”.
During PMQs, Ms Doyle-Price said: “To put 39 people into a locked metal container shows a contempt for human life that is evil. The best thing we can do in memory of those victims is to find the perpetrators and bring them to justice.”
Mr Johnson responded saying “all such traders in human beings should be hunted down and brought to justice”.
Labour leader Jeremy Corbyn said it was an “unbelievable human tragedy”, adding: “Can we just think for a moment of what it must have been like for those 39 people, obviously in a desperate and dangerous situation, for their lives to end, suffocated to death in a container?”
Irish Prime Minister Leo Varadkar told the Dail that investigations would be undertaken to establish if the lorry had passed through Ireland.
Since the Calais migrant camps were shut three years ago and security measures were increased at Dover and the Channel Tunnel, people smugglers have increasingly moved to other routes.
Asked which ports are being used, the National Crime Agency told me: “All of them.”
More dangerous methods are being used to get human cargo through.
The most common one is being hidden in the back of a lorry, but increasingly commercial shipping containers are being used, sometimes even refrigerated ones of the type seen on the back of the truck in Essex.
Risks are substantial for the migrants, who can pay £10,000 or more for a space on these vehicles.