Pequod was sunk by Moby himself. When they started attacking the whale in the end, Moby crashed into the ship and destroyed it completely, killing everyone on the ship. Ishmael, the narrator, is the only survivor. You could analyze this and say even that Ahab caused the pequod to sink because of his behavior and lunacy.