Guzman, known as "El Chapo" (Shorty) in Spanish, has long run Mexico's infamous Sinaloa Cartel and over the past decade he emerged as one of the world's most powerful organized crime bosses, even making it onto Forbes' list of billionaires.
He was caught in his native northwestern state of Sinaloa in an early morning operation without a shot being fired, Attorney General Jesus Murillo Karam said.
It is a political triumph for President Enrique Pena Nieto, who took office in late 2012. Pena Nieto confirmed the capture via Twitter earlier on Saturday and congratulated his security forces. The US government also applauded the arrest.
Guzman's cartel has smuggled billions of dollars worth of cocaine, marijuana and methamphetamines into the United States, and fought vicious turf wars with other Mexican gangs.
He pioneered the use of sophisticated underground tunnels to smuggle drug shipments across the border and also became a major narcotics exporter to Europe and Asia in recent years.
Nearly 80,000 people have been killed in the last seven years with much of the violence in western and northern regions that have long been key smuggling routes.
Many of the victims are tortured and beheaded and their bodies dumped in a public place or in mass graves. The violence has ravaged border cities and even beach resorts such as Acapulco.
Known as "El Chapo" (Shorty) in Spanish, Guzman has long run Mexico's infamous Sinaloa Cartel and over the past decade emerged as one of the world's most powerful organized crime bosses (Reuters photo)
Guzman, 56, was captured in a pre-dawn raid on a seaside condominium in the northwestern tourist resort and fishing and shrimp-processing center of Mazatlan, around 135 miles (220 km) from Guzman's suspected base in Culiacan.
He was then flown to Mexico City. Wearing a cream shirt and dark jeans and with a black moustache, he was frog-marched in front of reporters on live TV, bound for prison.
It was the first public glimpse of the elusive kingpin since he escaped from prison in 2001.
The 5-foot, 6-inch (1.7-metre) Guzman looked briefly toward TV crews on the tarmac at the Marines' hangar at Mexico City's airport. His head was shoved back down by a soldier wearing a face mask.
Murillo Karam said security forces had nearly caught Guzman days earlier, but he gave them the slip.
"The doors of the house ... were reinforced with steel and so in the minutes it took us to open them, it allowed for an escape through tunnels," he said.
They then tracked him down again and waited for the right moment to strike, Murillo Karam said, adding that some US agencies had helped in the capture.
He gave no more details but a US Homeland Security source said Mexican forces worked jointly with agents from the Drug Enforcement Administration (DEA), Immigration and Customs Enforcement (ICE) and the U.S. Marshals Service.
It was not clear whether Guzman would now face trial in Mexico or be extradited to the United States.
Alberto Islas, a security expert with Risk Evaluation, said Pena Nieto ordered his cabinet to capture Guzman immediately after taking office in December 2012, and handed the job to the Marines, widely seen as less corrupt than other security forces.
Citing people involved in the operation, he said 25 Marines entered the condominium where Guzman was staying and evaded two security teams there to protect the drug lord. Guzman and three other people, including a woman, were asleep at the time.
The whole operation took around 7-1/2 minutes and neighbors only realized it had taken place when they heard the helicopter whisking Guzman away, Islas said.
Mexican TV channel Foro TV broadcast footage of the inside of the relatively modest condominium, where the door to the apartment where Guzman was sleeping had been kicked in.
A swimming pool was in the yard below, and just across the road, a beach. The apartments have views over the sea.
After the raid, clothes and bed sheets were left strewn over the tiled floor of the austere dwelling. Short-term lets for a two bedroom apartment in the complex run at around $1,200 a month, according to rental websites.
Traffic snarled outside the property on Saturday evening as motorists stopped to snap photos. Colored lights lined the road ahead of carnival celebrations due next week.
Local builder Arturo Ramos, 35, drove with his family to see the site. He said there had been no extortion since Guzman took control of the area in around 2009, and now fears another cartel will try to move in.
"We're worried this will mean war here," he said. "All of us who have businesses here are worried about his capture. No one will be able to protect us, not the federal government, no one."
"There was stability under him," he added. "There were no robberies, no kidnappings. Now there will be chaos."
Guzman's exploits have made him a legend in many impoverished communities of northern Mexico, where he has been immortalized in dozens of ballads and low-budget movies.
The United States had placed a $5 million bounty on Guzman's head and authorities in Chicago last year dubbed him the city's first Public Enemy No. 1 since gangster Al Capone.
US Attorney General Eric Holder described the arrest as a landmark achievement. "The criminal activity Guzman allegedly directed contributed to the death and destruction of millions of lives across the globe through drug addiction, violence and corruption."
The Homeland Security source said US agents assisted on the ground near the arrest site, and that the operation was the result of connecting many dots, not a single tip.
"I don't think either the Mexicans or our guys could have done this by themselves," he said. "We've been searching for years and wouldn't have been in this position without leveraging and combining assets from Mexico, the DEA, ICE and the Marshals."
Drugs violence in Mexico exploded after conservative former President Felipe Calderon sent in the army in early 2007 to try to quell powerful cartel bosses.
Some were captured or killed but the campaign triggered turf wars and countless atrocities. While the centrist Pena Nieto has criticized Calderon's policy, he also found it tough to break with.
Calderon congratulated Pena Nieto's government in a message on Twitter on Saturday, describing the arrest as a "great blow."
There was some concern in the United States that Pena Nieto might not be as aggressive in pursuing cartel leaders as Calderon had been, but Guzman's capture will ease those fears.
However, his capture is seen unlikely to interrupt the flow northward of cocaine, heroin, marijuana and crystal meth.
"This is indeed a very significant development and will no doubt have a huge ... symbolic value for the Mexican government and for U.S.-Mexico cooperation," said David Shirk, an expert on drug trafficking at the Wilson Center in Washington.
"The one thing that is clear is that this is not the end of the war. There's, unfortunately, many other players involved in moving illicit drugs into the United States."
From humble roots to billionaire
From humble beginnings in a ramshackle village, Guzman rose up in the 1980s under the tutelage of Sinaloan kingpin Miguel Angel Felix Gallardo, alias "The Boss of Bosses," who pioneered cocaine smuggling routes into the United States.
He came to prominence in 1993, when assassins who shot dead Roman Catholic Cardinal Juan Jesus Posadas claimed they had been gunning for Guzman but got the wrong target.
Guzman is the latest in a series of high-profile capos to be caught or killed.
Last July, Pena Nieto's government caught the leader of the Zetas drug cartel, Miguel Angel Trevino, also known as Z-40.
The Zetas have been blamed for many of the worst atrocities of Mexico's drugs war, acts that have sullied the country's reputation and put fear into tourists and investors alike.
Analysts were divided on whether Guzman's lieutenant Ismael "El Mayo" Zambada would take the helm of the Sinaloa Cartel.
Alejandro Hope, security director at the Mexican Competitiveness Institute think tank, said Guzman's downfall represented the end of a 30-year era of high-profile drug lords running riot across Mexico.
"There will be very few figures of this caliber," he said.
Pena Nieto has sought to play down the drug fight, seeking to focus public attention on a series of economic reforms spanning energy to telecoms, which he has pushed through Congress aiming to boost long-lagging economic growth.
He has also tried an unorthodox strategy, co-opting vigilantes in western Mexico in the fight against the feared Knights Templar Cartel. Security experts say this is potentially playing with fire.
Guzman has been caught before, and famously gave his jailers the slip. In 2001, he escaped from prison, reportedly in a laundry cart, to become Mexico's most high-profile trafficker. He is believed to command groups of hitmen from the U.S. border into Central America.
He was indicted in the United States on dozens of charges of racketeering and conspiracy to import illegal drugs.
Forbes dropped Guzman from its list of billionaires last year, because it was impossible to verify his wealth.