an own goal
1. In sports, a goal that a player accidentally scores for the opposing team. I can't believe we lost the championship because of an own goal. I was trying to get the puck out of our zone, but I scored an own goal—how mortifying!
2. An action pursued because it seems beneficial but that ultimately has a detrimental effect. Sheila's speech was supposed to win her more supporters, but it became an own goal once she started ranting off-topic. The law seemed promising, but it has generated such strong opposition that it's become an own goal for the president.