The six-carriage sleeper ran into problems outside Stöde station near Sundsvall, when two of the cars jumped off the tracks.
"I was sleeping when I heard a huge crash, then the train began shaking violently," passenger Andreas Jarskog told the Expressen newspaper.
The train had originated in Gothenburg and passed through the Swedish capital and was headed toward Östersund in northwestern Sweden.
About 40 passengers were in the two carriages that completely derailed. According to reports, they are leaning against an electricity pole next to the tracks.
Another two carriages on the train appear to have partially derailed.
"The carriages are evacuated of all but one person who has neck pain. We’ll be bringing that passenger out once we have a protective neck brace in place,” emergency services spokesperson Ellinor Fransson told Dagens Nyheter (DN) newspaper.
Buses have replaced trains on the Torpshammer-Sundsvall part of the track, the Swedish Transport Authority (Trafikverket) said on its website, which added that normal rail traffic on the line won't likely resume until Wednesday afternoon.
"The train has torn up quite a bit of the track, so that must be replaced," Transport Authority spokeswoman Monica Näslund told the TT news agency.
Follow Ann on Twitter here