Mr. López played a leading role in what is widely considered the biggest drug-trafficking case in Mexican history. The episode — which inspired the 2000 movie “Traffic” — pitted the Mexican military against the United States Drug Enforcement Administration. Throughout the 1990s, Mr. López worked closely with them both. He served as a senior adviser to the powerful general who was appointed Mexico’s drug czar. And he was an informant for the D.E.A.