A series of novel D-ring fused or substituted steroidal N-heterocycles were synthesized, and their chemical structures were characterized by spectroscopic analysis. The anticancer activity of these compounds against four human cancer cell lines (MCF-7, H1299, HeLa and HepG2) were evaluated and the structure-activity relationship (SAR) was also investigated. Compound 3c displayed significant inhibitory activity on the four cancer cells with IC 50 values ranging from 3.88 to 10.05 μM. Overall, these studies indicated that construction of N-heterocyclic system with D-ring substituted containing a double bond at C-16 and C-17 or D-ring fused with [17,16-d] azolo [1,5-a]pyrimidine could be a promising strategy to improve antitumor activity for steroids deserved further investigation.