While Severus Snape (played by Alan Rickman in the movies) ended the series as a hero, he committed several villainous acts throughout the Harry Potter series. For example, Snape was responsible for telling Voldemort about the prophecy that got Harry's parents killed. However, funny enough, one of Snape's most villainous acts was a complete accident. In the Battle of the Seven Potters, Snape accidentally cuts George Weasley's ear while trying to help Harry's convoy (enough said that he wasn't all that successful).
Source:https://www.cbr.com/severus-snape-villainous-act-accident/