One way to look at alignment in sapient creatures would be to have it so when they are born, their brains develop in a certain way so they are either always at least 1 of the 3 -
1) Sociopath
2) Psychopath
3) Narcissist
or any combination of 2 to 3 of those.
That way despite having free will...