Extragonadal androgens play a pivotal role in prostate cancer disease progression on androgen receptor signaling inhibitors (ARSi), including abiraterone and enzalutamide. We aimed to investigate if germline variants in genes involved in extragonadal androgen synthesis contribute to resistance to ARSi and may predict clinical outcomes on ARSi. We included ARSi naive metastatic prostate cancer patients treated with abiraterone or enzalutamide and determined 18 germline variants in six genes involved in extragonadal androgen synthesis. Variants were tested in univariate and multivariable analysis for the relation with overall survival (OS) and time to progression (TTP) by Cox regression, and PSA response by logistic regression. A total of 275 patients were included. From the investigated genes CYP17A1, HSD3B1, CYP11B1, AKR1C3, SRD5A1 and SRD5A2, only rs4736349 in CYP11B1 in homozygous form (TT), present in 54 patients (20%), was related with a significantly worse OS (HR = 1.71, 95% CI 1.09 – 2.68, p = 0.019) and TTP (HR = 1.50, 95% CI 1.08 – 2.09, p = 0.016), and was related with a significantly less frequent PSA response (OR = 0.48, 95% CI 0.24 – 0.96, p = 0.038) on abiraterone or enzalutamide in a multivariable analysis. The frequent germline variant rs4736349 in CYP11B1 is, as homozygote, an independent negative prognostic factor for treatment with abiraterone or enzalutamide in ARSi naive metastatic prostate cancer patients. Our findings warrant prospective investigation of this potentially important predictive biomarker