The Viking Freya had just cast off with nearly 230 people onboard when the incident occurred near Erlangen in Germany early on Sunday.
The impact crushed the wheelhouse and killed a 49-year-old who was guiding the vessel in place of the captain and a 33-year-old sailor, ITV News reports.
Both men were from Hungary.
The ship was leaving Erlangen while it was still dark, on its way to Budapest along the Main-Danube Canal.
Everyone else onboard stayed on the ship for hours until rescue workers could extend a walkway to get them off and take them to nearby hotels.
Viking Cruises said the company was "heartbroken".
“We are heartbroken, and company executives are on the scene to work closely with local authorities to understand the details of the accident,” it said in a statement.
Police said the cause of the incident was under investigation.