Metastatic castration resistant prostate cancer (mCRPC) is primarily treated with therapies that prevent transcriptional activity of the androgen receptor (AR), cause DNA damage, or prevent cell division. Clinical resistance to these therapies, including second-generation androgen-targeting compounds such as enzalutamide and abiraterone, is nearly universal. Other treatment modalities, including immune checkpoint inhibitors, have provided minimal benefit except in rare subsets of patients. Both tumour intrinsic and extrinsic cellular programs contributing to therapeutic resistance remain areas of active investigation. Here we use full-length single-cell RNA-sequencing (scRNA-seq) to identify the transcriptional states of cancer and immune cells in the mCRPC microenvironment. Within cancer cells, we identified transcriptional patterns that mediate a significant proportion of inherited risk for prostate cancer, extensive heterogeneity in AR splicing within and between tumours, and vastly divergent regulatory programs between adenocarcinoma and small cell carcinoma. Moreover, upregulation of TGF-β signalling and epithelial-mesenchymal transition (EMT) were both associated with resistance to enzalutamide. We found that some lymph node metastases, but no bone metastases, were heavily infiltrated by dysfunctional CD8+ T cells, including cells undergoing dramatic clonal expansion during enzalutamide treatment. Our findings suggest avenues for rational therapeutic approaches targeting both tumour-intrinsic and immunological pathways to combat resistance to current treatment options.