The film begins with a prologue set in Richmond, Virginia in 1865, showing the ironclad CSS Texas, carrying the last of the Confederacys treasury, as Captain Adrian Tombs (Robert Cavanah) tries to run a Union blockade.
The film then moves to the present day, circa 1990s, where World Health Organization doctors Eva Rojas (Penélope Cruz) and Frank Hopper (Glynn Turman) are investigating a disease that is spreading across Mali, Africa. Assassins attempt to murder Eva, but she is rescued by Dirk Pitt (Matthew McConaughey), from National Underwater and Marine Agency, who was working nearby.
Dirk gets a call from a dealer in Nigeria. He sells Dirk a gold Confederate States of America coin, one of supposedly only five in existence, which was found in the Niger River. Dirk believes that this is a clue to the long-lost Texas. He convinces his boss, James Sandecker (William H. Macy), to let him, Al Giordino (Steve Zahn), and Rudi Gunn (Rainn Wilson), from NUMA, go to Mali to search. They give Eva and Hopper a ride, so that they can continue their investigation, for the WHO.
Businessman Yves Massarde (Lambert Wilson) and dictator General Kazim (Lennie James), who controls half of civil-war torn Mali, try to stop the doctors from discovering the source of "plague". Kazim sends men to kill them and the NUMA team, not realizing their CIA and Navy background. Dirk, Al and Rudi survive the attack. Rudi tries to get out of the country to get help while Dirk and Al go to rescue the doctors. They save Eva, and then the three try to get across the border, but are captured by Tuareg, who are fighting the civil war. The Tuaregs leader, Madibo, shows Eva his people, who are dying. After taking samples, Eva finds that the water is contaminated.
By accident, Al stumbles into a cave with a painting showing the ironclad Texas. Dirk believes that the Texas became stranded when the river water dried up after a storm and that the same river that carried the Texas now runs underground, spreading the contamination. They start to follow the dry river bed and work their way to the border. Dirk still hopes to find the ironclad along the way. Their plans are interrupted when they stumble upon the solar detoxification plant owned by Massarde, and realize that it is the source of the contamination. Rudi and Sandecker analyze their samples and find that the contamination is heading down the Niger River to the ocean, but they can't get any government help to intervene during a civil war in a sovereign country.
Massarde captures Dirk and the others. He keeps Eva but sends Dirk and Al to Kazim. They escape and contact Sandecker, who warns them that Kazim and his troops are after them. Dirk and Al enlist Madibos aid to return to the plant and rescue Eva. He helps them infiltrate the plant and rescue his people who are working there as slaves. Rather than risk discovery, Massarde plans to destroy the plant, making it almost impossible to stop the contamination. Al goes to defuse the bombs while Dirk tries to head off Massarde and save Eva. Massarde escapes. Dirk, Eva, and Al get away from the plant, but are strafed by Kazim in a helicopter gunship. A series of explosions along the dry river bed reveals the Texas, right where the cave painting showed it to be. They take cover inside but Kazims ammunition is too much for the old ironclad's armor. They manage to fight back with the old cannon and destroy Kazim's gunship, just as Madibo arrives with Tuareg reinforcements.
In the end the contamination is dealt with, and Sandecker is offered a deal to do some covert work, while the government serendipitously funds NUMA, which he accepts, tentatively. Massarde, busy eating with a businessman, does not notice that the waiter who serves him water (which he drinks) served only him and disappeared with the rest of the bottle. The Texas gold, which belongs to the CSA - Confederate States of America, is left with Madibos people. Later, while Al, Rudi, Sandecker are busy, Dirk and Eva are at the beach at her house on the bay in Monterey.