I'll use Washington state as my source, but laws will be similar in other states. RCW 9A.76.020 outlaws obstructing a law enforcement officer, which this would be: it is a gross misdemeanor. In using lethal force, you would have committed first degree murder, under RCW 9A.32.030. There is a defense that can be used, per RCW 9A.16.050, that homicide is justified when:
In the lawful defense of the slayer, or his or her husband, wife,
parent, child, brother, or sister, or of any other person in his or
her presence or company, when there is reasonable ground to apprehend
a design on the part of the person slain to commit a felony or to do
some great personal injury to the slayer or to any such person, and
there is imminent danger of such design being accomplished.
Law enforcement officers have access to justifiable homicide defenses as well under 9A.16.040, for example
(b) When necessarily used by a peace officer to overcome actual
resistance to the execution of the legal process, mandate, or order of
a court or officer, or in the discharge of a legal duty
(c) When necessarily used by a peace officer or person acting under
the officer's command and in the officer's aid: (i) To arrest or
apprehend a person who the officer reasonably believes has committed,
has attempted to commit, is committing, or is attempting to commit a
The outcome of the case would hinge in part on whether the officer's arrest and use of force was lawful. To take two extremes, if the guy on the ground had just killed a dozen people and was aiming to rack up another dozen kills, the officer's arrest would almost certainly be held to be legal and his degree of force justified. Your personal belief that the suspect was compliant and unarmed might be refuted by the facts. On the other hand, if the guy on the ground had slept with the officer's sister and the officer wanted to rid the world of this vermin, then the arrest and force would almost certainly be held to be not legal.
It can be legal to use deadly force to resist unlawful arrest. See John Bad Elk v. United States, 177 U.S. 529, where the court held that
if a party resisted arrest by an officer without warrant, and who had
no right to arrest him, and if, in the course of that resistance, the
officer was killed, the offence of the party resisting arrest would be
reduced from what would have been murder, if the officer had had the
right to arrest, to manslaughter
The court also said
where the officer is killed in the course of the disorder which
naturally accompanies an attempted arrest that is resisted, the law
looks with very different eyes upon the transaction when the officer
had the right to make the arrest from what it does if the officer had
no such right. What might be murder in the first case might be nothing
more than manslaughter in the other, or the facts might show that no
offense had been committed.
This ruling has been somewhat eroded, in US v. Simon:
We recognize that law enforcement officers are frequently called on to
make arrests without warrants and should not be held, so far as their
personal security is concerned, to a nicety of distinctions between
probable cause and lack of probable cause in differing situations of
warrantless arrests. It is for this reason we believe that the force
of John Bad Elk has been diminished
The upshot of this is that (assuming no warrant), leeway is granted to officers in assessing probable cause (I'm not sure anybody really knows at a general conceptual level what constitutes "probable cause". The court seems to imply that the remote hearsay used as the basis for the arrest would not have been sufficient for a warrant, but it was "reasonable grounds" for believing accused had committed a crime).
Your premise that the officer is about to shoot would have to be substantiated by some fact, such as a declaration "I'm gonna kill you". Otherwise, your belief that the officer was about to commit unjustified murder would itself be unjustified. With better fleshing out of the circumstances, you could manufacture a justified-homicide scenario.