The decision was jointly made by the Security Cabinet, which is made up by the ministers of defense, navy and security and civilian protection, said Lopez Obrador at a press conference in the city of Oaxaca in southern Mexico.
"I supported that decision ... It is not about massacres. Capturing a criminal can't be worth more than people's lives," he said.
On Thursday, the National Guard swooped on a house in Culiacan, capital city of the northwestern state of Sinaloa, to capture Ovidio Guzman Lopez, after a federal judge issued a warrant for his arrest.
Cartel gunmen then surrounded security forces in Culiacan, triggering gun battles in various parts of the city.
Minister of Security and Civilian Protection Alfonso Durazo announced later on Thursday that the Security Cabinet decided to release Ovidio Guzman in order to protect lives.
Lopez Obrador dismissed that the release of Ovidio Guzman is a sign of weakness on the part of his administration.
"We have no doubt that it was the best decision," said the president.
The Mexican authorities have indicated that Ovidio Guzman is part of the Sinaloa cartel, which his father directed until his capture in 2016 and his subsequent extradition to the United States.
The city of Culiacan, like other places in the Sinaloa state, is considered to be the stronghold of the Sinaloa cartel, which has maintained operations after the imprisonment of "El Chapo" in the United States, where he was found guilty of ten charges.