Answer:
This is more often seen in the phrase "Don't give up the ship," as in don't give it up for lost and abandon it.
Whether it's literally a ship in trouble or a metaphor for an endeavor that is becoming difficult, it essentially means to keep going or to keep trying to save the ship or effort in spite of the adversity.