The ferry -- the Britannia Seaways, which is owned by Danish operator DFDS -- left the Netherlands on Tuesday and quickly turned around to the Dutch port of Vlaardingen after the migrants made a hole in a trailer, the shipping company said in a statement.
"Police officers entered the ship from a police boat that met them as soon as Britannia entered the port," DFDS said.
The ship was on its way to Felixstowe in southern England. Two of the migrants were taken to a hospital to be treated for hypothermia. Their conditions were unknown.
The others received medical treatment at the port and were taken to a police location, emergency coordination organization Rijnmond Veilig said in a statement. It was not clear where the migrants were from or how they got aboard the ship.
A police dog was used to comb the ship for other migrants but didn't find any, the group said.
The discovery comes weeks after 39 Vietnamese migrants were found dead in a refrigerated truck near London. Two people in Britain and eight in Vietnam have been in their deaths.