Rats desert the sinking ship is an old English proverb which is used to indicate that people start to bail out on a project or abandon colleagues at the difficult times.
In old wooden ships there would always be rats on board. When the ship is about to sink the rats jump off and start swimming toward a safer place. It is said that that rats could instinctively detect the imminent collapse before human could. When rats leave a ship this is an ominous sign that the ship would sink.