Execute the own subordinates for failing to reach expectations or disobeying orders is not unheard of in history though it wasn't always a single dictator giving the order.
One case so dark that it may surpass even Darth Vader's actions is that of the Roman Consul Titus Manlius Imperiosus Torquatus who lived in 4th century BC.
He was a strict disciplinarian and during a campaign he gave the order that nobody was to leave his post. His son son upon seeing a group of enemy skirmishers who called insults at the Romans saw a chance for glory, attacked the skirmishers and defeated them. Proudly presenting the spoils of this victory to his father the son was probably surprised when his father ordered the legion to assemble to witness his (the son's) execution for trespassing the order.
There are reports that the Carthaginians generally executed unsuccessful generals by crucifixion, but I don't know how reliable those claims are. They are Roman sources and the Romans were all out to let the world know how very, very mean the Carthaginians had allegedly been. In any case I don't know the names of any Carthaginian generals who were killed that way.
I'm sure there are more examples but I would have to look up those. I believe I heard such stories about Chinese or Japanese commanders as well, but I really would have to look it up. I think that often lack of success along would not suffice for an execution so accusations of intended treason would often go along with it...
There are also cases of commanders ordered to be killed by their lords for being too successful and influential, Wallenstein being probably the most famous example.
Is there a particular reason for your interest in this?