Seven new oxazoline, benzoxazole and benzimidazole derivatives were synthesized from 3β-acetoxyandrosta-5,16-dien-17-carboxylic, 3β-acetoxyandrost-5-en-17β-carboxylic and 3β-acetoxypregn-5-en-21-oic acids. Docking to active site of human 17α-hydroxylase/17,20-lyase revealed that all oxazolines, as well as benzoxazoles and benzimidazoles comprising Δ16 could form stable complexes with enzyme, in which steroid moiety is positioned similarly to that of abiraterone and galeterone, and nitrogen atom coordinates heme iron, while 16,17-saturated benzoxazoles and benzimidazoles could only bind in a position where heterocycle is located nearly parallel to heme plane. Modeling of the interaction of new benzoxazole and benzimidazole derivatives with androgen receptor revealed the destabilization of helix 12, constituting activation function 2 (AF2) site, by mentioned compounds, similar to one induced by known antagonist galeterone. The synthesized compounds inhibited growth of prostate carcinoma LNCaP and PC-3 cells at 96 h incubation; the potency of 2′-(3β-hydroxyandrosta-5,16-dien-17-yl)-4′,5′-dihydro-1′,3′-oxazole and 2′-(3β-hydroxyandrosta-5,16-dien-17-yl)-benzimidazole was superior and could inspire further investigations of these compounds as potential anti-cancer agents. © 2019 Elsevier Inc.