On AA, and I'm pretty sure its the same on other airlines, checking in doesnt have any bearing on getting the miles. You are not considered having flown till your BP is collected/read at the gate/jetway.
If you check-in and leave without ever showing up at the gate and boarding your recoerd will be treated as a no-show. No miles.