Most constipation and diarrhea in turtles is diet-related. The condition is easily noticed in box turtles and tortoises, harder to recognize in water turtles. The sooner the problem is addressed, the easier it is to remedy, and the less likely there are going to be complications.
Feeding a diet that is inappropriate for the species can cause constipation, as for example feeding a diet that is too high in protein, low in fiber and other roughage, and foods that are too refined.
If the constipation is recent (measured in days), you can try and remedy it by changing the diet. Review the diet of your turtle and make sure it is the recommended diet for the species you have. Adjust the diet and see whether there is improvement. Dehydration can cause constipation in box turtles. Soak your box turtle daily for 1/2 hour in lukewarm water in a shallow container (about 1/3 shell height). Once the problem resolves, soak weekly. Review housing for the box turtle and make sure there is access to soaking water at all times in a setting where the turtle uses it, and adjust the humidity of the substrate and environment if necessary.
You can also try to dip some pieces of food into mineral oil and feed it to the turtle. It is also OK to give small amounts of milk of magnesia. This can be given by soaking the turtle in water to which a good swig of milk of magnesia has been added. Do not feed anything else if you do this. Do not repeat if unsuccessful. If you are not comfortable or don't know what I am talking about, don't do this. Constipation can also be caused by ingested rocks, intestinal obstructions of several kinds, intestinal torsion (the intestines in turtles are not attached like human intestines, so rolling the around can twist around the intestines), egg binding, bladder stones, and tumors.
If changing the diet does not resolve the constipation within a day or two, the animal must be examined by a veterinarian. Exams can include X-Rays and fecal exams.
Sometimes a turtle with severe constipation or an intestinal obstruction will start dragging its hindlegs.
Often, a constipated turtle will stop eating and become listless and sluggish.
In box turtles it can take weeks before the condition becomes apparent. It is a good idea to check for stools. Turtles should defecate at least every other day (if fed every other day), or daily (if fed every day).