Michael Campbell of the 1700 block of East Eager Street was also charged with assault and several handgun violations, police said. Police described him as a repeat violent offender, and he was transported to Central Booking.
Campbell is charged with killing 44-year-old Phillip Johnson of the 1000 block of West Lombard Street, police said.
Johnson was fatally shot while sitting inside a corner store at the 1800 block of Edmondson Avenue in Catonsville on Oct. 28 around 9:50 p.m., police said.
Homicide detectives said they learned the suspect entered the store, opened fire on the victim, and fled on foot.
Campbell was arrested at St. Agnes Hospital in Baltimore, police said. They said they recovered his firearm.
Baltimore City police had an open warrant for his arrest for aggravated assault, authorities said.