That sounds a lot like the anime Tokko.
Tokko (TV) - Anime News Network
I remember what happens in it but, for the life of me I can't remember the name.
A large hole opened in the ground and most everyone at the apartment complex was killed. A survivor ended up going into the police force. One day he came across a special unit that used swords. They used swords because it was the only way to kill a parasite creature that took control of humans. He eventually transferred to that special unit because he found out he was like them. One of the people in the special unit happened to be someone he knew as a child at the apartment complex.
What is the name of this anime?
Now I remember. A friend recommended it so I watched it.
Question answered, thanks to zyta.