I've always found it hard to do. Alignment (at least in my games) is just a label for how the character behaves. It isn't a private club with restricted membership and dues.
Now, there are a number of items and conditions that can force an alignment change. Some are artifact level, some aren't, but you can make something up as you see fit.
Also consider Bestow Curse. You can do just about anything with that.
There's also Atonement, which changes the target's alignment instantly.
Finally, consider Lycanthropy. Each were-creature has an alignment, and someone afflicted has to make Saves to resist having their alignment changes as their animalistic side takes over. And the fun thing is, even after the Lycanthropy is cured, the new alignment stays.
But, like I said, it's a descriptive phrase, not a jail cell. Nobody is locked in. So, like it or not, you need the player's consent or it simply won't work.