The lawyers call it different things in different jurisdictions, but it is usually called Felony Murder by us mere mortals. Accused accomplice charged with murder in death of intruder killed in home invasion | AL.com
Two guys are just hanging out in one of their homes, when 2 would-be bad-guys force their way in and attempt a robbery. The 2 friends fight back, and in the fight one of the bad-guys is shot and killed.
The other guy was arrested a few days later, and has now been charged in the death of his accomplice.
Under Alabama law, a person can be charged with murder if they are participating in a felony crime that results in death, whether or not that person actually pulled the trigger.
Neither the guy who was arrested or the guy who got shot is a stranger to law enforcement.