If I booked a mileage award travel through American Airlines, and have checked in at the airport and passed security, can I still cancel my trip a few hours before I board, in the event of an emergency? Or once I check in at the airport there is no canceling?
The key to changing or canceling your ticket after check-in is to undo the checkin. Once the checkin is removed, you can request refunds/redeposits or changes under the same rules as before, subject to the same restrictions and fees, until departure. I have no direct experience with AA in this matter, but it generally holds among the major passenger airlines.
While some airlines, like KLM or United, let you cancel a check-in from their website, I could not find any evidence that American Airlines lets you do so. If you are at the airport, the gate agent will certainly be able to offload you from the flight. If the flight has not yet gone under "airport control" — typically between 4 and 24 hours before departure, depending on the flight and the airline— a telephone agent should be able to undo the checkin as well.
Your ticket is assigned a status code in the airline's systems. When you make the initial reservation, the ticket is marked Open for Use. Before departure, it is put under Airport Control, so the carrier's agents at the airport have control of it. Once you check in, it naturally become Checked-in. When your boarding pass is scanned, it is moved to Lifted/Boarded, and after the flight is completed, it is marked as Flown/Used. There are about a dozen other statuses, and you can read about them in the IATA ticketing rules if so moved.
The point is that an airline agent at the airport can only refund, exchange, or reissue your ticket if it is under Open for Use or Airport Control, and a telephone agent or travel agent can only handle those transactions under the former. That is why the check-in needs to be removed before any changes can be made; the computer won't even let the agent get to that screen if the ticket is marked as Checked-in.