The Bahamas-registered Mona Lisa, with mainly Germans on board, ran aground on Sunday in the Irbe Strait, a main route from the Baltic Sea to Latvia's capital Riga.
Attempts to move the ship failed throughout the night so officials decided to move the crew and passengers to the nearby port city Ventspils 37 kilometers (23 miles) away.
"All passengers, all 651, have been evacuated from the ship and taken to Ventspils safely," Latvian coast guard spokeswoman, Liene Ulbina said.
"Later they will all be taken by train to Riga," Ulbina said, adding there were more than 330 crew members on board still waiting to be taken off the stranded ship.
"When all crew members have been evacuated we will try again to pull the ship free," Ulbina said. It was not immediately clear whether the vessel had been damaged.
The Mona Lisa, which first came into service in 1966, was on charter to a German ferry tour operator, Lord Nelson Seereisen, from April 28 to August 31.