I went through something similar with my son. When he was in diapers, he would have multiple bowel movements each day. When we started potty training, however, he fought to keep it in for days. He got so constipated that he was in horrible pain and I had to give him a suppository. We were both in tears over the whole ordeal.
My biggest advice would be don't make it a battle, and don't force him if he's scared! That will set him up for long-term problems! The most common cause of constipation in children is fear of having a BM. If he remembers it as a traumatic experience, he won't want to do it.
Here's what worked for us: When my son was going through his constipation problem during our potty training phase, I let him poop in a diaper. He could tell when it was coming, and I'd put one on him until he went. I really struggled with it because somehow I thought this might be setting back his potty training, but I believe it actually helped.
Once his constipation was improved and the BM's were no longer painful, I came up with an incentive program. For my son, toy trucks worked. I found a pack of 10 at Target for $7. Everytime he went poo-poo in the potty, he'd get a truck. Within a few days we went from him crying/screaming/holding it in to him running to the potty multiple times a day, squeezing out whatever little turd he could and announcing, "Now that deserves a truck!"
It's never been an issue for us since. I hope it works out as quickly for you. I know it's hard!