A person is falling into a pool of lava. If another person were to shoot them as they're falling, would the killer be charged for murder?
Since we don't have a system of robot justice, it's impossible to say whether a prosecutor would file charges in this bizarre circumstance, since filing charges is discretionary. However, this situation does fit the description of murder. It is intentional, it causes death (maybe, vide infra), it is not legally justified (as self-defense, or as an act legally sanctioned by a state executioner), the victim is a person. It is not sanctioned by any "death with dignity" statute. The one issue that might be effectively argued by the defense assuming the irrefutability of the factual claims of your scenario is that perhaps the relevant crime is assault with a deadly weapon, since it probably could not be proven beyond a reasonable doubt that the victim died from the shooting, and not from being incinerated by lava. It depends on where the person is shot, and with what.