"It's the police who have asked us to do this," a DSB spokesman told AFP, as several hundred other refugees marched on a motorway hoping to get to Sweden, which has more generous asylum rules than Denmark.
At least two trains carrying around 200 refugees were being held in Rødby, Scandinavia's busiest ferry crossing to Germany.
The refugees refused to register with Danish authorities, which would mean having to apply for asylum in Denmark or returning to Germany, whereas they want to seek asylum in Sweden.
Some people had tried running from the trains but most of them were detained by police and sent to a refugee centre.
Ferry operator Scandlines told public broadcaster DR that only passengers with a car would be let on board its ferries at the crossing.
DSB had also cancelled all trains through Padborg, a German border town in the western Jutland region.
"All train traffic to and from Padborg station has currently been stopped for the safety of those who are at the station," local police wrote on Twitter.
Police on Wednesday closed part of a motorway near Padborg as around 300 migrants set off on foot to Sweden.
They had been housed in an old school building after arriving in the town but headed for the motorway, saying they wanted to go northward to Sweden, where the asylum conditions are more generous.
Sweden has become a top EU destination for refugees by issuing permanent residency to all Syrian asylum seekers.
In contrast, Denmark has sought to reduce the influx by issuing temporary residence permits, delaying family reunifications and slashing benefits for newly-arrived immigrants.