It was not immediately clear what had caused the accident at a port in the southeastern Sjursoeya district of Oslo.
Images from national broadcaster NRK showed at least two train cars in the water beside the dock and a collapsed one-story concrete building.
Oslo police and rescue personnel were on the scene, where a second building was also damaged.
A spokesman for the company that operates the port was not immediately available for comment.