The security chief of the prison in Culiacan, the capital of the northwestern Mexican state of Sinaloa, was gunned down, police said.
Alejandro Osuna Rios was murdered on Friday in front of his house, police said.
The 36-year-old Osuna Rios had been in charge of security at the prison for four months.
Osuna Rios was attacked by several gunmen riding in two SUVs as he stood in front of his house with his wife and son in the Villas del Manantial district.
Sinaloa state Attorney General's Office investigators found 44 bullet casings and an ammunition clip for an AK-47 at the crime scene, as well as the officer's service weapon.
Osuna Rios, who had just started his vacation, did not have time to draw his 9 mm pistol and return fire, police said.
Sinaloa is currently the scene of a bloody turf war among several cartels.
The state is home to the drug cartel led by Joaquin "El Chapo" (Shorty) Guzman, who was arrested in Guatemala in 1993 and pulled off a Hollywood-style jailbreak when he escaped from the Puente Grande maximum-security prison in the western state of Jalisco on Jan. 19, 2001.
The Sinaloa organization, sometimes referred to by officials as the Pacific cartel, is the oldest and most powerful drug cartel in Mexico.
The Sinaloa cartel, according to intelligence agencies, is a transnational business empire that operates in the United States, Western Europe, Eastern Europe, the Americas and Asia.
About 50,000 people have died in Mexico's drug war since December 2006, when President Felipe Calderon declared war on the country's powerful cartels, sending soldiers into the streets to fight criminals.