Under Woolsey, Sheppard continued to lead efforts to fight the Wraith and Michael, who returned a final time to takeover Atlantis. With the help of Todd, Sheppard and his team attempted to find a way to eliminate the Wraith's need to feed on humans, but this led to a betrayal by Todd when he believed that Sheppard activated the Attero Device to destroy the Wraith at the cost of any activated Stargate in the Pegasus Galaxy. Despite this, Sheppard continued working with Todd when the situation called for it. In the series finale, "Enemy at the Gate", Sheppard learned about a new, more powerful hive ship from Todd and worked to stop it from reaching and destroying Earth. When all else failed, even Atlantis, Sheppard boarded the ship with a nuclear weapon in a suicide mission to save Earth. Sheppard succeeded in destroying the hive ship and saving Atlantis and Earth, but, due to a surprise appearance by the rest of his team, survived the experience. He later joined Atlantis' senior staff as they looked out over the Golden Gate Bridge from Atlantis, which had landed on Earth in the aftermath of the hive ship's attempted attack.