Yes molasses is a natural laxative and can get your bowels moving when you're constipated.
I always use molasses when I'm constipated and the molasses works better than anything else I've tried when relieving my constipation.
I take 2 tablespoons of molasses and then within a few hours I start having to poop and am able to have a bowel movement comfortably.
You can even add some honey to the molasses to make it work faster as a laxative since honey itself is also a natural laxative.