I apologize if what I say is a repeat of what others have said already; I have not had a chance to read anything yet.
When babies fall asleep, they go through phases. The first is light sleep, and it sounds like your guy is in light sleep. So putting the baby down right after he falls asleep, or even 5 minutes after he falls asleep, will shock him awake and cause him to cry/fuss, etc.
Deeper sleep doesn't hit until 15-30 minutes in. It is important, if you're rocking baby to sleep, to do it for 15-20 minutes. Wait for the muscle twitches to stop, wait for the smiles and the hands to stop. Wait until baby is basically dead weight in your arms. Their arms would hang down to the sides if you let them; or if you lift them above them, they'd simply fall limply down. This is the time to lay them down in the crib :)
Shushing noises like the sound of the mother's heart in the womb help, as well. At 5 months, he is still dependent on you and cannot "learn to sleep" on his own, so CIO is basically just him crying himself to sleep out of exhaustion, not from learning to sleep. It's a form of learned helplessness.
I sure hope that helps! Our girl is a champion sleeper (she is now 2) and we used this to get her to sleep. Hope it helps!