A dog might start eating dirt due to a mineral deficiency or gastric upset. Eating nonedible items is known as pica. A dog may also not be eating dirt specifically but targeting food on or under the ground, accidentally ingesting small amounts of dirt in the process.
If a dog suddenly begins to eats dirt or grass, he may be suffering from gastric upset and attempting to dilute or expel something from his stomach. If he vomits or has diarrhea afterward but then returns to normal eating habits, he is most likely fine; however, if he starts eating large quantities of dirt at a time, there may be something wrong with his digestive system or bowels.
Regular and compulsive dirt-eating most likely stems from a mineral deficiency in a dog's diet. Instinctively, a dog starts eating dirt to try and obtain crucial vitamins and minerals. This can usually be remedied by switching to a higher-quality dog food after checking to make sure it contains all necessary nutrients.
As long as soil-eating is an occasional activity, it is unlikely to harm a dog's health. However, if it is compulsive and frequent and there is no underlying physical problem, the pet owner may need to modify the dog's behavior by providing more interactive play sessions and exercise to help distract the dog.