Ex post facto law means a law that makes something you did wrong after the law was passed illegal. This is like if you were playing in a game that had rules, and then after playing, the rules changed to make what you did wrong. This would be like the game saying, "Now you can't do that thing you just did - it was against the rules!" That wouldn't be fair. That is why ex post facto laws are not allowed in the United States.