Maxperson
Morkus from Orkus
The AOO caused by leaving reach actually occurs right before the creature exits. It interrupts him in the middle of his action, one of the very few ways to interrupt an action before the trigger completes, and then it leaves reach.This is contrary to what the rules say. You can't make an opportunity attack against an enemy that is within your reach. If he triggered the AOO then he must be outside your reach. The fact that you can make an attack against an enemy beyond your reach is a case of specific rule for AOOs vs general rule for attacks.
So the sequence of that is.
1. Creature is leaving reach.
2. AOO triggers and you attack.
3. Creature leaves reach and is now 5 feat away.