Female dogs produce milk, or something with the appearance of milk, for two sets of reasons. Most of the time it is related to real or perceived pregnancy, but it can also be related to various illnesses.
Lactation
Female dogs spontaneously produce milk when they have given birth to puppies. This is a normal part of biological parenthood for any female mammal.
False Pregnancy
Female dogs may also produce milk when experiencing a false pregnancy or when another creature attempts to nurse from her. A false pregnancy is a condition where a female dog exhibits various symptoms of pregnancy, such as producing milk and building a nest for her puppies, but is not pregnant. Female dogs can also produce milk when another creature, such as a puppy or kitten, sucks and kneads her mammary area, even though she may not be pregnant or have recently given birth. This would have been essential when dogs lived in the wild in the case of orphaned pups.
Hypothyroidism
Hypothyroidism occurs when the circulating level of thyroid hormone (T4) is too low. This causes the dog’s metabolism to slow down, resulting in symptoms that are typically associated with old age, such as lethargy, weight gain, loss of muscle coordination, and many more. Hypothyroidism usually occurs in medium to large dogs between 4 and 10 years old, and can be caused by lymphocytic thyroiditis, thyroid cancer, improper level of iodine, being born with it (congenital hypothyroidism), or for no clear reason.
Mammary Gland Tumor
Mammary gland tumors are growths in one or more of a female dog’s eight to ten teats. They may or may not be cancerous. Hormones are a clear factor in mammary cancer, as only half of one percent of dogs spayed before their first heat ever develop the disease. Toxins, such as pesticides and household chemicals, may be a risk factor, but there are no clear and certain non-hormonal causes of mammary gland tumors. In the case of a mammary gland tumor, the white substance produced may look like milk, but it is actually pus.