Viewed while looking west from the house’s patio, Mazatlán was a promising paradise: soft sand, warm water and a sea rich with shrimp and tuna. Turn around, though, and there was the graffiti-tagged house, formerly owned by drug cartel capos, followed by others. On the way to the Hotel Siesta, home to a Kerouac memorial plaque and the Shrimp Bucket — a restaurant founded in 1963 by the same Mexican and American partners who created the apex of night-life cheesiness, Señor Frog’s — we drove by another empty drug mansion and its adjacent nightclub. It had been closed for years. With giant fake rocks on the facade, it looked like a Disney prototype on meth.

That night we had dinner with a few Mazatlán intellectuals at a restaurant owned by Alfredo Gómez Rubio, the raspy-voiced president of the Centro Histórico Project, which is renovating the city center to draw people back from the Zona Dorada. With outdoor seating on the main plaza, the area is a centerpiece of the remodeling efforts, but when we arrived, I had just checked into the El Cid Castilla Beach, one of the best-known “Golden Zone” resorts. It was a total disaster. First the hotel staff overcharged me by nearly $500; then they ran out of towels at the pool.

Mr. Gómez Rubio called the whole tourist zone a mistake. “There was no concept or style,” he said. His restaurant by the main plaza, Pedro & Lola, couldn’t be further from that description. It featured a tasty menu heavy on shrimp and featured redwood beams brought from California in the 1850s. Mr. Gómez Rubio also owns the Hotel Melville a few blocks away (the author of “Moby Dick” visited in 1844), and he was a fan of Kerouac. As soon as I sat down, he showed me a worn Kerouac paperback with Spanish text and pink highlighter tracked over a paragraph that started “oh the sacred sea of Mazatlán” and ended with Kerouac praising “the city of the innocence.”

Mr. Gómez Rubio insisted that Mazatlán still deserves to be called a paradise. He said the drug violence that scared off Americans and cruise ship operators — it peaked in 2011, when a Canadian tourist was shot in the leg while caught in the cross-fire — was back under control. With gang warfare and street crime returning to lower levels. Mexican tourists were filling the void left by Americans, he said, and retirees were moving in. “We’re shifting the market,” he said. “We’re learning.”

I wanted to believe it. At times, I did: drinking that final beer and eating ahi tuna at La Corriente; walking through El Quelite, a tiny town 20 minutes outside Mazatlán, where a local doctor turned his family home into a full rural experience, with food, animals and a kitschy performance by a Mexican cowboy.

But there were still so many dark omens. Kerouac’s vision of Mazatlán — and Mr. Gómez Rubio’s — left out the consequences of the Mexican lawlessness that, while allowing for epic highs, also produces refugees who are moving into fields on the city’s edge because teenagers with guns and dreams of cartel riches are demanding money to live in their rural mountain villages. Thousands of displaced families now occupy the no man’s land between El Quelite and new beachfront developments, and I found them only with help from Dr. Barraza and Mr. Coppel. That is where I met José Enciso Loaiza, who was hammering together a bed near a new slum named Las Vegas. He said 70 of the 90 families in his small town had already fled because of violence and government impotence. His life, from the pastoral to the punishing, was literature begging to be written.

When Kerouac reached Mexico City at dawn after a long bus ride through Guadalajara, he caught a few hours of sleep in “a criminal’s hovel,” then made his way to Burroughs’s house in La Roma, a turn-of-the-century neighborhood of grand old homes that was starting to slip into disrepair. Kerouac was supposed to meet up with Enrique later, but his heart wasn’t in it; he never told him where Burroughs lived, and then Wild Bill “persuaded me to stick to him instead of Enrique.”