On the basis of the Zaleplon structure, novel pyrazolo[1,5-a]pyrimidines were designed and prepared for studies on their hypnotic activity. This paper reported the synthesis of twelve new 5-methyl-7-substituted-pyrazolo[1,5-a]pyrimidine-3-carbonitrile derivatives by using simple starting materials such as propane dinitrile and triethyl orthoformate. The structures of the derived target compounds were confirmed by their IR and ^1H-NMR spectroscopic data. The preliminary pharmacological evaluations indicated that some compounds showed hypnotic activity, whilc derivative 1c was the most potent one.