Kong Ming ordered the killing of Ma Mo, in fact, it was a very sad choice, after Ma Mo's death, Kong Ming was also very sad, and he also shed tears while paying tribute to him, why would Kong Ming value Ma Mo so much? Although Kong Ming was invincible in terms of tactics, governing the army had always been his weakness.

Novels and TV series have set up a perfect image for him, but we still have to start from history and admit this. Ma Mo, on the other hand, was well read in military books, was very good at military theory, and could put forward many valuable insights in governing the army.
Therefore, he was appreciated by Kong Ming, and often called him to the tent to talk, and the conversation was most of the night. The relationship between the two also became very close, and Kong Ming regarded him as his own son.
Later, Xuan De died, and the affairs of the Shu Kingdom were all taken care of by Kong Ming alone, which was really a heavy burden, of course, he wanted to find someone to share, and Ma Mo was a very suitable candidate. Therefore, during the Northern Expedition to cao jun, he let Ma Mo be the vanguard of the army, hoping that he could share his worries.
However, everyone knows the later story, although Ma Mo has a prominent theory, he does not have rich combat experience, and he is a person with a more arrogant personality, only believing in his own decision-making, and finally suffered a fiasco in the street kiosk and made a big mistake.
This incident disappointed Kong Ming so much that he had to be executed in order to appease the generals. Before his death, Ma Mo also wrote a letter to express his gratitude to Kong Ming, he felt that it was his luck to meet The Minister, even if he died, there was no complaint, which showed that the feelings between the two were indeed quite deep.
Although Kong Ming was quite optimistic about Ma Mo, Xuan De was not cold to this person before his death, and even had some disgust, and before he died, he also left a last word, saying that Ma Mo was too pompous and could not be reused in the future. Why is Xuande's attitude towards Ma Mo diametrically opposed to Kong Ming's?
This actually stems from the fact that he and Kong Ming are in different positions, and the way of seeing people is naturally different. Xuan De was the leader of a country, and he wanted his regime to be stable, when Ma Chen's older brother Ma Liang held military power, and if his brother was reused, then the Ma family would become a threat to himself.
Therefore, Xuande arranged some civilian positions for Ma Mo and did not allow him to serve in the army. However, Ma Mo was keen on the military, and was naturally not interested in these trivial matters of civilian officials, and the officials should be careless, but when he talked about the army, he talked endlessly.
Such an act made Xuan De quite disgusted, he knew empty talk if he did not do his job well, and the minister had a good relationship with Ma Mo, and it was not good to directly abolish Ma Mo, and only when he was about to die did he put forward the warning not to reuse him.
Since Ma Mo was not involved in combat affairs during Xuande's lifetime, his theories existed only on paper and had no chance to be put into actual combat. Later, he was appointed as a pioneer by Kong Ming, which was a position beyond his ability, and in actual combat, he was only a newcomer, and failure became a matter of course. Later, there was the Battle of the Street Pavilion with tears and horses, and the Shu kingdom was almost destroyed this time.
It seems that Uncle Huang's last words finally became a reality, and indeed he could not entrust the heavy responsibility to Ma Chen. However, the emergence of this situation is still due to the fact that Xuande did not give him the opportunity to exercise, and in order to eliminate the threat, he always made Ma Mo a civilian official.
Ma Mo's defeat was still very sympathetic, although his own character was also one of the factors, who called the power of his family, threatened the position of the boss, in the situation of that year, there was no condition for him to become a good general.
Resources:
The Book of Shu
Romance of the Three Kingdoms
Folklore of the Three Kingdoms