Thyroid-stimulating hormone (TSH) is secreted by cells in the front part of the pituitary gland. This tiny area in the brain regulates the key endocrine function of the thyroid gland by stimulating production of thyroxin, the main thyroid hormone. TSH is the main hormone tested by your doctor to determine if your thyroid gland is functioning properly.