I'd think too that not provoking the Mongols would be the better move. Then again, I don't know what Genghis' messenger demanded. Did he really tell Choresm (which had two million soldiers at that time) to submit?
First of all two million soldiers is ridiculous. Even if you count adult men able to carry a sharp stick and a stone as soldiers.
As a matter of fact we know surprisingly little about this incident. We even do not know if it was a decision of Chorezm Shah himself or it was an initiative of his local governor.
But we do know that before that for a few years the Mongol armies had moved freely in the area North from the Choresmian Empire sometimes extremely close to it's borders and these areas might be considered as spheres of his influence by Shah. The Mongols chased their enemies who tried to flee from the wrath of Gengizz Khan for hundreds and hundreds of miles killing and looting on their way.
It does not take a genius to guess who will be the next target of the Mongols in the West.
And Khorezm Shah Muhammed was not stupid, he was a talented general and politician.
You see Gengis Khan never tried to conceal his intention to make the Mongols the rulers of the world. It was not just one more steppe tribal confederation trying to bite off a piece of China. Gengis Khan wanted to unite all the steppe peoples and to lead them against the sedentary civilizations.
You may compare him with Adolf Hitler who from the very beginning was about World War and World domination. He said about it, he wrote about it, he did everything, everything possible in that direction. But some people just did not want to see it, and some saw it.
My guess Shah Muhhamed was that wise man who saw the truth - the conflict was inevitable.
As for execution of the Mongol embassy we also know nothing. We know only the Mongol version of the events, but that was propaganda. The steppe peoples were very sensitive about such things as unprovoked murder of their traders and ambassadors. That needed immediate reaction, called for revenge, and what is important made this war justified by the Heaven. Some kind of steppe Crusade - the Heaven is on our side against the dirty bastards.
But we know that after that the Mongols used this trick on a permanent basis - they send their ambassadors with the demands which were intentionally unacceptable and humiliating - the ambassadors lost their heads or noses or both - and here we are, we've got another steppe Crusade. Nice trick (though I personally would not want to be a Mongolian ambassador, kind of lousy job with low life expectancy).
So my guess that there might be something intentionally insulting in the message of Gengizz Khan. He might not exactly demand him to submit, but he might call Kharezm Shah "my son" or something like that - and Muhammad had to react violently as it was an open challenge. So this embassy was a suicide mission.