Melamine is an organic base and a trimer of cyanamide, with a 1, 3, 5-triazine skeleton. It is usually used for the production of plastics, glue and flame retardants. Melamine combines with acid and related compounds to form melamine cyanurate and related crystal structures, which have been implicated as contaminants or biomarkers in protein adulterations by lawbreakers, especially in milk powder. This paper is focused on developing an available method for quantitative detection of melamine in the fields of security inspection and nondestructive testing based on THz-TDS. Terahertz (THz) technology has promising applications for the detection and identification of materials because it exhibits the properties of spectroscopy, good penetration and safety. Terahertz time-domain spectroscopy (THz-TDS) is a key technique that is applied to spectroscopic measurement of materials based on ultrafast femtosecond laser. In this study, the melamine and its mixture with polyethylene powder in different consistence are measured using the transmission THz-TDS. And we obtained the refractive index spectra and the absorption spectrum of different concentrations of melamine on 0.2-2.8THz. In the refractive index spectra, it is obvious to see that decline trend with the decrease of concentration; and in the absorption spectrum, two peaks of melamine at 1.98THz and 2.28THz can be obtained. Based on the experimental result, the absorption coefficient and the consistence of the melamine in the mixture are determined. Finally, methods for quantitative detection of materials in the fields of nondestructive testing and quality control based on THz-TDS have been studied.