Some historical texts paint Topsy's execution as a battle in the War of the Currents, and that Edison's company was leveraging the stunt to show that AC power was more dangerous than DC. But a simple review of the timeline shows that the debate over AC versus DC had been settled more than 10 years prior to the elephant's death.
That means Edison had little to prove through (yet another) public animal electrocution. From all accounts, Edison wasn't present during Topsy's killing. Newspaper reports from the time do mention that electricians from an Edison company were involved in setting up the technical aspects of the execution, but because of various mergers and buyouts it's not clear that Edison himself was even a part of those companies.
Also, there was a film crew from Edison Manufacturing recording the event, and Thomas A. Edison is credited at the end of the clip — you can easily find it online if you have the stomach to watch it. But the same company created more than 1,000 films bearing Edison's name, and they often made these recordings without his input or direction, making it very possible that Edison had nothing at all to do with Topsy's unhappy ending.
Of course, Edison may have orchestrated the killing from afar. Perhaps he offered technical direction for the placement of the copper fittings and the setup of the AC system. Maybe he was harboring leftover resentment from the AC-versus-DC debacle and decided to take it out on an animal. We'll probably never know for sure.
Regardless, Edison gained little, if anything at all, from Topsy's death. AC remained the standard of choice for electricity transmission all over the world. And Edison later admitted that he wished he'd paid heed to AC at the very beginning of the electrical revolution so that he could've been on the side of the victors.
Edison's name is hardly tarnished by his defeat in the war of the currents. He is still regarded as an iconic figure in world history and virtually synonymous with the spread of incandescent light bulbs. And fortunately for his legacy, Edison is also spared direct association with the electrocution of a doomed elephant named Topsy.