City Hall has ordered every agency to undertake initiatives to reduce crime, like installing street lighting and clearing vacant lots. The mayor requires department heads to attend daily meetings where they discuss not only the previous day’s murders but the best way to board up abandoned buildings.

It is unclear whether the strategies are working: There were nine killings during the first 12 days of 2018.

The Police Department finds signs of hope where it can. The first weekend in January was a bright spot; there was only a single homicide. “Three days, one murder — that’s no accident,” Kevin Davis, the police commissioner, said at the next daily crime intervention meeting. “But what gets us is the Mondays and Tuesdays. Let’s do the best we can.”

The police say the vast majority of homicides are retaliatory and committed by repeat offenders. Last year’s victims had an average of 11 arrests each. Almost half had been arrested in connection with violent crimes and nearly three-quarters on drug charges. The suspected killers had similar rap sheets, though they had been arrested fewer times on average than the victims.

Some woes common to cities are worse in Baltimore. A port city, it has been a center of heroin use and distribution since at least the 1970s. “If I live in a neighborhood that has been festering with drugs for 20 years, I’m going to be a drug dealer or be on drugs or be a victim of one or the other,” said Tammatha Woodhouse, the principal of Excel Academy, the small alternative school that Mr. Scott attended.

The neighborhoods she is talking about have been starved of investment in schools, businesses — even sidewalk repair. The city has 16,000 abandoned homes. Its rate among children of lead poisoning, which often comes from peeling paint and has been linked to lack of impulse control and learning disabilities, is nearly three times higher than the national rate.