

Mortal Kombat 1
Ermac made his first appearance as a playable character in Ultimate Mortal Kombat 3, however, his origins date back to the first Mortal Kombat game. Due to a glitch, it was said that Scorpion's costume would sometimes appear as a reddish-orange color, and the message "Error Macro" would appear on the screen. The rumor became so popular, that Midway finally added him as a character, shortening the phrase "Error Macro" to "Ermac."
Mortal Kombat co-creator
Ed Boon has since debunked the origins of the rumor. The term "Ermac" actually came from an audit screen (see images) within the game.
Ermac's storyline is, by far, one of the most interesting in Mortal Kombat. It's believed that he exists as a life force brought together by the souls of extinguished Outworld warriors. Shao Kahn took possession of these souls and forced Ermac to serve as his enforcer for many years. Ermac participated in the invasion of Earthrealm, when Kahn was defeated however Ermac still remained in his control and wandered Outworld without and instructions. Ermac was found by Kenshi and freed from Shao Kahn's control, in return Ermac taught Kenshi the art of telekinesis.
During the events of Mortal Kombat: Deception, Ermac is confronted by the spirit of Liu Kang. Liu Kang requests that Ermac help him in freeing the souls of the Earthrealm warriors currently being controlled by Onaga. Ermac was eager to help Liu Kang in order to clear his name from the evil he committed while under Shao Kahn's control. He and Liu Kang set out to free the Earthrealm warriors (Jax Briggs, Johnny Cage, Sonya Blade, Kitana and Kung Lao) from Onaga's control, and they are eventually successful in their pursuit. Ermac was pleased that his skills could be used for good, however, his celebration is short-lived as he feels the presence of a much more ominous force shaping the destiny of the realms.
Alignment:
Alignment: Good
Ultimate Mortal Kombat 3

An enigma to all who come into contact with him, Ermac's past remains shrouded in mystery. It's believed that he exists as a life force brought together by the souls of extinguished Outworld warriors. Shao Kahn has managed to take possession of these souls, and use them to fight on the side of tyranny.
Mortal Kombat: Deception

We are Ermac. We are the fusion of souls of dead warriors, created by Shao Kahn to obey him without question. We served as his enforcer for many years, until the Earthrealm warrior Kenshi released us from our bondage and awakened our perception of the worlds that surround us. We are now free to choose our own destiny.
We encountered a fellow warrior spirit who, like Kenshi, understood our suffering. Eager to alone for the atrocities we had committed in Shao Kahn's name, we agreed to help this warrior, Liu Kang, to liberate his allies from the control of the Dragon King. Shao Kahn may be dead, but it seems his essence lives on in this new menace. It is as if they are both manipulating by the very fabric of the realms.
Mortal Kombat (2011)

As punishment for resisting Shao Kahn's claim to the realm of Edenia, the souls of the vanquished were torn from their bodies and fused together to form the being now known as Ermac. Bent to Shao Kahn's will, Ermac is his foremost enforcer. The essences of so many souls bound together give Ermac immense telekinetic power--an advantage that will destroy Earthrealm's resistance to Shao Kahn's rule.
Mortal Kombat X

Ermac was created with dark magicks by the former emperor of Outworld, Shao Kahn. He is a collection of souls, those of the thousands of warriors vanquished in Shao Kahn's conquest of Edenia. After Shao Kahn's death, Ermac remained loyal to subsequent Outworld emperors: first Shao Kahn's chosen successor, Mileena, then the usurper, Kotal Kahn. He is now a key component in the emperor's efforts to quell Mileena's rebellion.
Mortal Kombat 1

Ermac is a collection of souls, bound together by Quan Chi's dark magic.
The souls within him were intended to function as a group mind. That part of the spell is temporarily undone, however, when Ermac is defeated by Mileena. During that period, one of the souls in Ermac's collection takes control of his group mind. It is that of Emperor Jerrod, deceased ruler of Outworld and husband of Empress Sindel. He rejoins the royal family, aiding Empress Mileena's reign.
But when Ermac's collection of souls re-establishes its control, Ermac retreats to Outworld's shadows. No longer Quan Chi's slave, not bound to the royal family, he must find a future worth fighting for.
Ultimate Mortal Kombat 3

Having been in hiding since the first Mortal Kombat, neither the Earth nor the Outworld has recognized this elusive warrior. Ermac uses his victory in the tournament to prove his existence...
As well as a warning that he will return in the fourth Mortal Kombat as on unstoppable force.
Mortal Kombat Trilogy

When Kahn finally eliminates his opposition, he finds a new and surprising foe in Ermac. The Outworld souls that give life to the warrior did not trust their tyrannical leader who planned to consume the powerful life for his own power.
Even Shao Kahn's power was no match for the overwhelming strength of legions of deceased Outworld warriors. They destroyed their master in a battle that devastated the entire realm. Ermac was left behind to rule it with his own brand of oppression.
Mortal Kombat: Deception

In an outer chamber of the Dragon King's throne room. Ermac did battle with Liu Kang's enslaved comrades. Ermac was more that a match for the five warriors, but their defeat was not his objective. Liu Kang materialized and, one by one, freed their souls while Ermac occupied the rest.
Eventually, all five were awakened from their enchantment and freed from Onaga's control. Ermac was pleased that his warrior skills could for once bring about a noble outcome. He sensed, however, that an ominous force still shaped the destiny of the realms. It was everywhere. He cloud feel influence on Onaga, though the Dragon King was oblivious to its manipulation. Time was running out. Ermac feared the celebration of this latest victory would be short-lived.
Mortal Kombat: Armageddon

The energy of Blaze shattered Ermac, separating him into the many warriors who comprised his being. Now each with his own physical form, the Ermacs are linked psychically and act according to their collective consciousness. No longer mere fusion of warrior souls, Ermac has become an army.
Mortal Kombat (2011)

With Shao Kahn dead, Ermac was no longer bound to him. Anarchy erupted within Ermac as the many warrior souls that comprised his being struggled for dominance. Only one had the strength of will to quiet the chaos. The conflict resolved, Ermac returned to Outworld, determined to reunite with his past. Queen Sindel and Princess Kitana were shocked to learn the truth: that trapped among the many spirits within Ermac was their husband and father, King Jerrod. Though he would never be the Jerrod they once knew, Ermac would forever serve and protect his queen and the Edenian people.
Mortal Kombat X

Alone once more, Ermac searched the labyrinthine corridors of Shao Kahn's old fortress--searching for the source of a faint voice calling to him. Suddenly a wisp of dust brushed his chest, wrenching free one of his many souls. The dust took the form of a man, who began to consume soul after soul. As the weakened Ermac stared helplessly, he recognized the mysterious figure: the sorcerer Shang Tsung. Returned from death.

Mortal Kombat X

Mortal Kombat (2011)

Mortal Kombat Deception & Armageddon

Ultimate Mortal Kombat 3

Audit screen from Mortal Kombat (1992)