In 1996 Afellay switched to the youth academy of PSV Eindhoven. Afellay's official debut for PSV Eindhoven was on 4 February 2004 during a cup match against NAC Breda at the age of 17. His debut in the competition was on 14 February, against Twente. In the 2003–04 season he played three official games, and seven more in the 2004–05 season.
On 15 May 2005, PSV Eindhoven played a game against Feyenoord. Afellay was a part of the starting lineup, and made a great impression with two goals.