Ah yes....my son did the same thing. In the very, very beginning (as in a few days old) he would sleep anywhere and all the time. Then, all of a sudden, he wouldn't sleep for more than 20 minutes unless he was being held. This lasted for a couple of months. I was so scared he'd never get over it! He's still not a great napper...but he'll sleep in his crib just fine!
Just be patient...it'll get easier. If he's not hurt, hungry, or wet then he probably likes your warmth and heartbeat. Try holding him until his arm is like a wet noodle and then put him in his bed. Are you swaddling? My son hated being wrapped up tight, but we found he liked to be tucked in. I know you're not supposed to let them sleep with blankets or on the boppy, but we used both. Sometimes he would sleep in his crib on his boppy because it hugged him and sometimes we would snuggle him into a big blanket...not swaddled, just kind of nestled in it. We checked on him frequently whenever we did this...but it helped him gradually be able to sleep on his own! Our Dr suggested buying one of those things that has rice in it that you can heat up (I don't know what they're called, it's like a sock with uncooked rice in it that you can microwave) and putting it next to him so he feels the warmth...we never did that because he started sleeping on his own.
Some people will tell you to let him fuss it out...but I did some research and according to what I found and according to my Dr you shouldn't let them do that until they're 6 months old....but I do know several people who did it before that age and it worked for them.
Good luck!!