High-resolution intraoperative PET/CT specimen imaging, coupled with prostate-specific membrane antigen (PSMA) molecular targeting, holds great potential for the rapid ex vivo identification of disease localizations in high-risk prostate cancer patients undergoing surgery. However, the accurate analysis of radiotracer uptake would require time-consuming manual volumetric segmentation of 3D images. The aim of this study was to test the feasibility of using machine learning to perform automatic nodal segmentation of intraoperative 68Ga-PSMA-11 PET/CT specimen images. Six (n = 6) lymph-nodal specimens were imaged in the operating room after an e.v. injection of 2.1 MBq/kg of 68Ga-PSMA-11. A machine learning-based approach for automatic lymph-nodal segmentation was developed using only open-source Python libraries (Scikit-learn, SciPy, Scikit-image). The implementation of a k-means clustering algorithm (n = 3 clusters) allowed to identify lymph-nodal structures by leveraging differences in tissue density. Refinement of the segmentation masks was performed using morphological operations and 2D/3D-features filtering. Compared to manual segmentation (ITK-SNAP v4.0.1), the automatic segmentation model showed promising results in terms of weighted average precision (97–99%), recall (68–81%), Dice coefficient (80–88%) and Jaccard index (67–79%). Finally, the ML-based segmentation masks allowed to automatically compute semi-quantitative PET metrics (i.e., SUVmax), thus holding promise for facilitating the semi-quantitative analysis of PET/CT images in the operating room.