You can't impeach someone for racial profiling, one. And two, it was known that the plan was afoot. The "muscle" terrorists came in under his watch. He could have easily admitted to the public there was a problem and have temporarily suspended travel from people with ties to terrorist nations.
I'm sure it wouldn't be called "racial profiling", but the law Congress would immediately pass would make it impossible to do so. And, a temporary suspension does nothing when they are content to wait until it's lifted. Also, they didn't need to fly in, they could simply walk across the southern border like thousands still do every year.