There is a need for fast and reliable quality and authenticity control tools of pharmaceutical ingredients. Among others, hormone containing drugs and foods are subject to scrutiny. In this study, terahertz (THz) spectroscopy and THz imaging are applied for the first time to analyze melatonin and its pharmaceutical product Circadin. Melatonin is a hormone found naturally in the human body, which is responsible for the regulation of sleep-wake cycles. In the THz frequency region between 1.5 THz and 4.5 THz, characteristic melatonin spectral features at 3.21 THz, and a weaker one at 4.20 THz, are observed allowing for a quantitative analysis within the final products. Spectroscopic THz imaging of different concentrations of Circadin and melatonin as an active pharmaceutical ingredient in prepared pellets is also performed, which permits spatial recognition of these different substances. These results indicate that THz spectroscopy and imaging can be an indispensable tool, complementing Raman and Fourier transform infrared spectroscopies, in order to provide quality control of dietary supplements and other pharmaceutical products.