BALTIMORE — Baltimore has both the highest murder rate among the nation’s big cities and one of the most broken relationships between its police and its citizenry. Only one out of four homicides were solved last year. And the city’s enforcement of marijuana laws has fallen almost exclusively on African-Americans.

Given this dire set of facts, the city’s top prosecutor announced on Tuesday that she would no longer bother with marijuana cases, a controversial move that she argued would improve police-community relations and allow law enforcement to devote more time to serious violent crime.

“If you ask that mom whose son was killed where she would rather us spend our time and our attention — on solving that murder, or prosecuting marijuana laws — it’s a no-brainer,” said Marilyn Mosby, the state’s attorney for Baltimore. She vowed at a news conference to no longer prosecute marijuana possession, regardless of quantity or prior criminal record, and said she would seek to vacate almost 5,000 convictions.

Ms. Mosby’s move places her in a vanguard of big-city prosecutors, including Kim Foxx in Chicago, Larry Krasner in Philadelphia, Cyrus R. Vance Jr. in Manhattan and Eric Gonzalez in Brooklyn, who are moving away from marijuana cases, declaring them largely off limits and in some cases going so far as to clear old warrants or convictions off the books.