Achieving direct electrochemical detection of 17β-estradiol (E2) at low concentrations remains a challenge due to the weak electrochemical activity of E2. In this study, we report a simple, cheap, and sensitive electrochemical sensor based on nanocomposite for the direct detection of E2 in wastewater. The nanocomposite sensing electrode was developed by electrochemical in-situ polymerization. Due to the π-π stacking and hydrogen bonding between poly-L-tyrosine (P(L-tyr)) with E2, we prepared P(L-tyr) electrode based on dopamine-modified multi-walled carbon nanotubes (PDA-CNTs) and gold nanoclusters (AuNCs). Then P(L-tyr)/AuNCs/PDA-CNTs/GCE sensing system was obtained. Meanwhile, the synergistic effect of fast electron transfer of AuNCs and the signal amplification effect of PDA-CNTs enables sensitive and direct detection of E2. The results showed that P(L-tyr)/AuNCs/PDA-CNTs/GCE sensor had a linear response to E2 concentration from 0.05 to 10 μmol·L−1 with a detection limit of 7.1 nmol·L−1. Then, the trace amount of E2 in pharmaceutical wastewater samples can be directly detected against several interferences from complex matrix, with recoveries from 91.0 to 107.5%. P(L-tyr)/AuNCs/PDA-CNTs/GCE showed good stability when placed at room temperature. Therefore, it can meet the requirements of the sensitive detection of E2 in complex matrix.