On 19 October, he scored the opening goal in a 2–2 draw with Zenit Saint Petersburg in the Champions League. He scored the second goal in a 2–1 win over Illichivets Mariupol on 10 March. On 6 May, he played the full match in a 2–1 extra time victory against Metalurh Donetsk in the Ukrainian Cup Final. He finished the season with six goals, five in the league, from 37 appearances, 27 of which came in the league. Shakhtar secured the Ukrainian Premier League title for the third year in a row and the Ukrainian Cup title for a second time in a row. Shakhtar opened the season with a 2–0 win against Metalurh Donetsk in the Super Cup, however Willian failed to make the squad for the match. He had to wait until the fourth league match of the season, on 6 August, before making his first appearance of the season in a 4–0 win against Volyn Lutsk. He replaced goalscorer Alex Teixeira after 46 minutes. On 19 August, he scored his first goal and made two assists in a comprehensive 5–1 victory against Chornomorets Odesa. Willian scored both of Shakhtar's goals in their 3–2 loss over European champions Chelsea in the group stage of the Champions League on 7 November. On 31 January 2013, Willian moved to Anzhi Makhachkala for a fee thought to be in the region of €35 million. He originally chose to wear the number 10, however due to UEFA restrictions that states a player must wear a number used in the Champions League for the remainder of the season, he was forced the wear the number 88 he had chosen at Shakhtar. After moving to Russia, Willian said he was happy to join Anzhi and wished Shakhtar Donetsk great success in the future. On his debut, Willian sustained an injury against Newcastle United in a Europa League match. He scored his only Anzhi goal on 14 April 2013 in a 3–0 victory against Volga Nizhny Novgorod. In August 2013, following financial restructuring, Anzhi chose to transfer list their whole squad, including recent signing Willian. On 25 August 2013, English Premier League club Chelsea agreed a deal to sign Willian for a fee of £30 million, subject to a work permit hearing on 28 August 2013. The deal was made official on 28 August 2013 and Willian signed a five-year contract, receiving the number 22 shirt.