Even though, like any chief executive, he worked around the clock perfecting his product, maintaining his supply lines, and doing battle—literally, at times—with his competitors, the drug lord Joaquín “El Chapo” Guzmán always found time for his favorite pet project: trying to make a movie about his life.

I first heard about the would-be film last year while covering Guzmán’s criminal trial in Brooklyn. There, on the witness stand, the kingpin’s friend and fellow narco Alex Cifuentes testified that his girlfriend, a young Colombian actress, had encouraged Guzmán in 2007 to turn his tale into a major motion picture—no doubt looking for a role in it. Enthralled by the idea, the drug lord hired a writer, and in between making cocaine deals and dodging the authorities, he began to sit for interviews, mostly at his heavily guarded hideouts high in Mexico’s Sierra Madre mountains.

Within a few years, however, the project was in turnaround. First, the writer, Javier Rey, unwisely sought to strong-arm his subject for a percentage of the profits and was forced into hiding when Guzmán tried to kill him. Not long after, Cifuentes, an executive producer on the film, was arrested, leaving the deal to be completed by his personal assistant, Andrea Velez.

Star-Studded Cast

Velez, as I learned while researching my book El Jefe: The Stalking of Chapo Guzmán, had a talent for the movie game and quickly distilled Rey’s script—tentatively titled El Padrino (Spanish for “The Godfather”)—into an 18-page promotional package, complete with a biography section (“Who is Joaquín Guzmán?”) and a scene-by-scene synopsis. The Mexican actor Gael García Bernal was, without his knowledge, cast as the protagonist, with John Leguizamo slotted for the role of Pablo Escobar. The pitch deck was shopped around but ultimately floundered—not least because it was never meant to actually succeed.

Unbeknownst to Guzmán at the time, Velez was an undercover F.B.I. informant and had used her role in the movie project (and in other business dealings) to spy on him and his entourage. At one point, Velez’s American handlers tried to lure the kingpin out of hiding by having her tell him that Hollywood was interested in his screenplay. The plot was abandoned when Guzmán tried to kill her too, but not before Velez went to Los Angeles as part of the ruse to meet with agents and producers.

Gael García Bernal was cast as El Chapo, with John Leguizamo slotted for the role of Pablo Escobar.

Even when Guzmán was caught and jailed in 2014, he kept working on the film. From inside Mexico’s most forbidding prison, he contacted the country’s biggest soap-opera star, Kate del Castillo, and sold her the rights to his story. When Guzmán escaped the following year—through a mile-long tunnel dug into his cell—the American actor Sean Penn became involved. In late 2015, Penn and del Castillo flew to Mexico and met with Guzmán to discuss the film, accidentally interrupting a capture operation by the D.E.A. and the Mexican Marines.

The dream of the project still lives on. Not long after finishing my book, I happened to have a meeting with a well-respected European film producer and, over our second drink, she quietly confided that Guzmán’s people had recently reached out to her, peddling his script. The kingpin had, by then, been convicted at his trial in New York and sentenced to life in prison. But the advice I gave the producer was unswerving: Whatever else you do, do not return the call.

Alan Feuer’s El Jefe: The Stalking of Chapo Guzmán is out now from Flatiron Books