Use of pentoxifylline in preparation of medicaments for preventing or treating constipation, a pharmaceutical composition comprising pentoxifylline for preventing or treating constipation and a method for treating constipation by using pentoxifylline are disclosed. The trial of the present invention proves that pentoxifylline can improve constipation, especially functional constipation.