When there were wooden ships in common use, there would always be rats on board. If the ship were to sink the rats would jump off and swim away because they knew the ship was sinking and that they needed to swim to safety/shelter.
The phrase is now used to refer to people who ditch a lost cause because they weren't committed to it. Unlike the captain and men on the ship who would have tried to save it the rats just fled. Unlike the creators of a cause would try and keep the cause afloat (if you'll excuse the pun) whereas the tag along followers just there for the ride (again an interesting pun - thus why this phrase fits so nicely) would just ditch it.
http://wiki.answers.com/Q/What_does_'Rats_desert_a_sinking_ship'_mean
The phrase is now used to refer to people who ditch a lost cause because they weren't committed to it. Unlike the captain and men on the ship who would have tried to save it the rats just fled. Unlike the creators of a cause would try and keep the cause afloat (if you'll excuse the pun) whereas the tag along followers just there for the ride (again an interesting pun - thus why this phrase fits so nicely) would just ditch it.
http://wiki.answers.com/Q/What_does_'Rats_desert_a_sinking_ship'_mean