On 28 July 2012, Shevchenko announced that he was quitting football for politics.
In May 2012, Shevchenko was named in the Ukrainian squad for Euro 2012. In Ukraine's opening game, Shevchenko scored two headers to beat Sweden 2–1 in Group D. In Ukraine's final game, against England, Marko Dević scored a "ghost goal" in the second half, with Ukraine losing 1–0 to a Wayne Rooney goal. Dević's shot was hooked clear from behind the England goal-line by Shevchenko's former Chelsea teammate John Terry under the eyes of the additional assistant referee standing beside the goal (as confirmed by video replays). The incident reopened football's goal-line technology debate. Replays, however, also showed Artem Milevskiy should have been ruled offside before Dević's shot. After this game, Shevchenko announced he would retire from international football, having been Ukraine's youngest and oldest goalscorer and record marksman with 48 goals in 111 appearances.
In November 2012, Shevchenko refused to accept Football Federation of Ukraine's proposal to become head coach of the Ukraine national team.
After his retirement in June 2012, Shevchenko immediately joined Ukraine – Forward! (formerly known as Ukrainian Social Democratic Party) and took second place on the party list for the October 2012 Ukrainian parliamentary election. This was in spite of him stating a month earlier that he wanted to coach after his playing career: "This is the world I understand, the world I want to stay in." In the election his party won 1.58% of the national votes and no constituencies and thus failed to win parliamentary representation.