Prostate cancer is the second most common cause of cancer-related deaths worldwide. The mucin 1 (MUC1) oncoprotein is highly expressed in human prostate cancers with aggressive features. However, the role for MUC1 in occurrence and progression of castration-resistant prostate cancer (CRPC) remained elusive. In this study, we showed that solamargine, a major steroidal alkaloid glycoside, inhibited the growth of CRPC cells, which was enhanced in the presence of metformin. Furthermore, we found that solamargine increased phosphorylation of AMPKα, whereas reducing the protein expression and promoter activity of MUC1. A greater effect was observed in the presence of metformin. In addition, solamargine reduced NF-κB subunit p65 protein expression. Exogenously expressed p65 resisted solamargine-reduced MUC1 protein and promoter activity. Interestingly, exogenously expressed MUC1 attenuated solamargine-stimulated phosphorylation of AMPKα and, more importantly reversed solamargine-inhibited cell growth. Finally, solamargine increased phosphorylation of AMPKα, while inhibiting MUC1, p65 and tumor growth were observed in vivo. Overall, our results show that solamargine inhibits the growth of CRPC cells through AMPKα-mediated inhibition of p65, followed by reduction of MUC1 expression in vitro and in vivo. More importantly, metformin facilitates the antitumor effect of solamargine on CRPC cells.