On 14 March 2007, Ahn scored a hat-trick in a game of the Korean League Cup against Daejeon Citizen, but his poor performance became longer, and he was left out of the national team for the 2007 AFC Asian Cup. In 2008, he returned to Busan IPark, formerly Busan Daewoo Royals. He steadily improved his game and overall performances and, for the first time in 22 months, was recalled to the national team for the 2010 FIFA World Cup qualifications match against Jordan. In March 2009, he signed a three-month contract with Chinese Super League side Dalian Shide. He became the key player in the club and extended his contract to December 2010 with Dalian Shide in June, though J2 League club Oita Trinita had an intention to sign him. He was promoted to Dalian's captain in the 2010 season. Ahn officially announced his retirement on 30 January 2012.