Shaw had just swallowed a massive amount of energy and and would use it as soon as Charles released him.
Shaw's mutant ability was to absorb energy and redirect it and his goal was to create a world without non mutants.
“We are the children of the atom. Radiation gave birth to mutants. What will kill the humans will only make us stronger.”
―Sebastian Shaw, X-Men: First Class
He had just swallowed nearly the entire submarine's nuclear reactor. X-Men: First Class, 1:43:49
At the beginning of the fight Shaw didn't see Erik as a threat and was just playing around with him, trying to get Erik to join his side. And he also knew that Charles wasn't a threat as long as he had the helmet on.
If Charles had let him go I imagine he would have gotten serious and ignited the spark needed for World War 3. While Charles abhors killing he also always thinks about the greater good.
While I don't know the energy a nuclear submarine has or how big an explosion it would be, Shaw could basically just self destruct and take the ships with him. Russia and America would probably take that as a go for nuclear launches.
This scene shows Shaw absorbing a grenade and practically obliterating the person he redirects the energy to, imagine what he could do with the energy from a nuclear reactor.