Mr. Guzmán, in contrast, emerged in court on Tuesday as much less of a sybarite. He enjoyed his whiskey, beer and cognac, Mr. Martínez said, and seemed to have a particular fondness for women. But while Mr. Guzmán kept four or five mistresses throughout the 1990s, Mr. Martínez suggested he was not so much in love as he was jealous — often spying on his girlfriends with a wiretap.

Mr. Guzmán was not the only one who reveled in extravagance. Mr. Martínez recounted, for example, how he and his boss once went to visit Juan José Esparragoza, a veteran trafficker who was serving time in prison. When the two men arrived, they discovered their colleague at a jailhouse party, surrounded by waiters, cooks and a mariachi band. Dinner was being served and the guests had a menu to choose from: lobster, steak or pheasant.

But as was often the case in Mr. Guzmán’s orbit, luxury was never far from bloodshed. Mr. Guzmán had paid the visit to the respected older trafficker to ask for his permission to assassinate a rival, Mr. Martínez said.

At that time, Mr. Guzmán and his crew were waging war with the Tijuana drug cartel in a gothic, gruesome conflict. The wife of one of Mr. Guzmán’s allies had already had her throat slit. The ally’s two young children were also victims of the fighting: They had been tossed off a bridge by an assassin.

Mr. Guzmán put the profits from his empire into seeking retribution, Mr. Martínez said, outfitting an army of gunmen and setting off a two-year cycle of attacks. One took place in 1992 at a Puerto Vallarta nightclub. The following year, a revenge attack for the nightclub shooting claimed the life of Juan Jesús Posadas Ocampo, a beloved Roman Catholic cardinal.

In his testimony Tuesday, Mr. Martínez offered a startling account of the cardinal’s death, saying that his killers had slain him accidentally while gunning for Mr. Guzmán. The hit took place in the middle of the Guadalajara airport, he recalled. Mr. Guzmán escaped the hail of bullets by fleeing past a baggage carousel and out onto the street — all while toting a suitcase filled with $600,000 in cash.

Despite these grisly stories, Mr. Martínez claimed in court that he was not a violent man. In fact, he said, the only time he ever owned a gun, Mr. Guzmán told him to get rid of it. The kingpin was worried he might hurt himself.

But once, he said, he asked his boss why he was so enamored of hostility.

“I said to him, ‘Why kill people?’” Mr. Martínez told the jury. “And he answered me: ‘Either your mom’s going to cry or their mom’s going to cry.’”