Curious, two things are going on. At the end of your period, your cervix close and the last bit of left over menstrual debris is trapped inside your uterus. This is normal. When you orgasm, your uterus will contract and your cervix and uterus move around quite forcefully. This can force out the left over menstrual debris.
The other thing is that he could have scratched you or caused a micro tear if he was rough, you were dry or he tried to insert something big.
Either way, it is normally not something to be worried about, unless it does not stop or it keeps on happening.
Period sex is very safe, but if you can absolutely not take a chance to get pregnant, use something else as well. If not, make sure that you track your cycles and that it is definitely not bleeding but your period before you allow him to ejaculate inside you.
It does not sound like pregnancy. If you are still worried, take a pregnancy test to make sure.
Take care