title_body: What constituant in coffee has a laxative effect?
upvoted_answer: Disclaimer: I am not a doctor, nor do I play one on TV...
  
  I would guess that it is a combination of a few factors.
  
  
  Coffee contains caffeine which is a stimulant and most stimulants have some degree of laxative effect. 
  
  
  If nothing else stimulants will raise your metabolism, so even if it isn't immediate you'll be heading to the bathroom sooner than you would without them. 
  It also looks like caffeine causes stimulation of the bowels specifically. 
  
  
    coffee can also cause looser stools because increased peristalsis
    leaves less time for the colon to perform one of its key
    functions–reabsorbing water from fecal matter to produce well-formed
    stools. Be aware, however, that other common accompaniments to coffee
    can be culprits in this matter. Dairy products, excess sugar, even
    “sugarless” sweeteners like sorbitol (a well-known substance used as a
    laxative) can cause diarrhea. - Source
  
  
  Coffee is mostly water  
  
  
  Just drinking a couple full glasses of water on an empty stomach can lead to a softer stool.
  
  The psychological effect  
  
  
  I don't know if there have been any real studies on this, but I strongly suspect that there is some Classical Conditioning going on. Much like Pavlov's dogs who were conditioned to salivate at the sound of a bell, if your usual morning routine is to have a cup of coffee and then head to the restroom, over time you end up conditioning your self to do this regardless of whether or not the coffee is really "making you poop".