Dopamine is an important neurotransmitter in the body and closely related to many neurodegenerative diseases. Therefore, the detection of dopamine is of great significance for the diagnosis and treatment of diseases, screening of drugs and unraveling of relevant pathogenic mechanisms. However, the low concentration of dopamine in the body and the complexity of the matrix make the accurate detection of dopamine challenging. Herein, an electrochemical sensor is constructed based on ternary nanocomposites consisting of one-dimensional Pt nanowires, two-dimensional MXene nanosheets, and three-dimensional porous carbon. The Pt nanowires exhibit excellent catalytic activity due to the abundant grain boundaries and highly undercoordinated atoms; MXene nanosheets not only facilitate the growth of Pt nanowires, but also enhance the electrical conductivity and hydrophilicity; and the porous carbon helps induce significant adsorption of dopamine on the electrode surface. In electrochemical tests, the ternary nanocomposite-based sensor achieves an ultra-sensitive detection of dopamine (S/N = 3) with a low limit of detection (LOD) of 28 nM, satisfactory selectivity and excellent stability. Furthermore, the sensor can be used for the detection of dopamine in serum and in situ monitoring of dopamine release from PC12 cells. Such a highly sensitive nanocomposite sensor can be exploited for in situ monitoring of important neurotransmitters at the cellular level, which is of great significance for related drug screening and mechanistic studies.