Molasses should be stored in a cool, dry place, away from direct sunlight and heat. Keeping it in an airtight container can also help to prevent moisture from getting in and prolong its shelf life. If stored properly, molasses can last for several years.