The cargo vessel bound for Felixstowe returned to the Dutch port of Vlaardingen, near Rotterdam, as soon as the stowaways were found, they said in a statement.
The people found in the container received medical attention at the port and two were taken to hospital for further treatment for possible hypothermia.
The discovery comes the month after 39 Vietnamese people were found dead in a refrigerated truck in Britain, again laying bare the risks of illegal migrant routes to Europe.
“On board a ship it turned out that several people were found in a cooling container. The ship returned to the harbour,” said the Rotterdam region emergency services on Twitter.
“The 25 people were taken off the ship and given the medical care they need. Earlier the message came from the ship that no people died.
“Two people were transported to hospital for extra medical care. Twenty-three people were transferred to a police location after a medical check-up.”
DFDS Seaways, which operates the cargo ferry, said that the migrants had come on board on a lorry trailer, De Telegraaf newspaper said.
The driver of the truck had been arrested, it added.
A bus took away the mainly male group, some of whom were wrapped in silver thermal blankets.
Their nationalities were not immediately known.
The mayor of Vlaardingen, Annemiek Jetten, said “more and more” people were trying to cross the Channel and had not been put off by the deaths of the Vietnamese migrants.
“I think people are so desperate that they keep trying, despite the tragic events in the UK not so long ago,” Jetten told broadcaster NOS.
She added that it was not clear if more people were trying to get to Britain before immigration laws become tougher after its scheduled exit from the EU next year.
Separately on Tuesday Dutch border police intercepted a bus carrying 65 Moldovan nationals including children who were planning to claim asylum, Dutch media reported.
dk/ecl