A new approach is presented for localizing the Subthalamic Nucleus (STN) during Deep Brain Stimulation (DBS) surgery based on microelectrode recordings (MERs). DBS is an accepted treatment for individuals living with Parkinson’s Disease (PD). This surgery involves implantation of a permanent electrode inside the STN to deliver electrical current. Since the STN is a very small region inside the brain, accurate placement of an electrode is a challenging task for the surgical team. Prior to placement of the permanent electrode, microelectrode recordings of brain activity are used intraoperatively to localize the STN. The placement of the electrode and the success of the therapy depend on this location. In this paper, an objective approach is implemented to help the surgical team in localizing the STN. This is achieved by processing the MER signals and extracting features during the surgery to be used in a Machine Learning (ML) algorithm for defining the neurophysiological borders of the STN. For this purpose, a new classification approach is proposed with the goal of detecting both the dorsal and the ventral borders of the STN during the surgical procedure. Results collected from 100 PD patients in this study, show that by calculating and extracting wavelet transformation features from MER signals and using a data-driven computational deep neural network model, it is possible to detect the borders of the STN with an accuracy of 92%. The proposed method can be implemented in real-time during the surgery to model the neurophysiological nonlinearity along the path of the electrode trajectory during insertion.