The meeting came after US President Donald Trump last week vowed to designate Mexican drug cartels as terrorist organisations, following the massacre of nine women and children from a US-Mexican Mormon community in northern Mexico.
Lopez Obrador - who rejected Trump's idea, equating it to "interventionism" - said Barr was cordial in their closed-door meeting at the presidential palace in Mexico City.
"As a lawyer, he understands that our Constitution requires us to adhere to the principles of development cooperation and non-intervention in foreign policy," the leftist leader wrote on Twitter afterward.
Customs agents charged over record Australian drug bust
"On that basis, we can always work together."
Lopez Obrador had said he planned to raise the issue of gun trafficking from the United States at the meeting.
Mexico regularly insists the violence of its "drug wars" is a shared problem, fueled by both demands for narcotics in the United States and the black-market flow of American-made weapons south of the border.
Lopez Obrador had earlier told a news conference that the two sides would be "reviewing a document that will serve as a reference point," but did not give further details.
Barr later held a separate meeting with the Mexican foreign, security and navy ministers.
Mexico said they had discussed cooperation on "priorities" including arms trafficking, money-laundering and combatting transnational crime.
They also agreed to strengthen the US-Mexico High Level Security Group, launched last August, the government said in a statement.
Trump has been talking tough on Mexico's powerful drug cartels since the three Mormon women and six children were brutally murdered on November 4, allegedly by gunmen from the La Linea cartel.
Mexico moves toward legal abortion, but women still face jail
He tweeted after the killings that the US was ready to help Mexico "wage war" on its cartels.
That, plus his vow to blacklist cartels as terror groups, has fueled fears in Mexico that the United States could try to mount a military intervention.
Lopez Obrador, who took office a year ago, is struggling to rein in Mexico's drug-fueled violence.
This year appears on track to break the country's murder record, with 28,741 so far.
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ