Background: Primary central nervous system lymphomas (PCNSL) pose a challenge as they may mimic gliomas on magnetic resonance imaging (MRI) imaging, compelling precise differentiation for appropriate treatment. This study focuses on developing an automated MRI-based workflow to distinguish between PCNSL and gliomas. Methods: MRI examinations of 240 therapy-naive patients (141 males and 99 females, mean age: 55.16 years) with cerebral gliomas and PCNSLs (216 gliomas and 24 PCNSLs), each comprising a non-contrast T1-weighted, fluid-attenuated inversion recovery (FLAIR), and contrast-enhanced T1-weighted sequence were included in the study. HD-GLIO, a pre-trained segmentation network, was used to generate segmentations automatically. To validate the segmentation efficiency, 237 manual segmentations were prepared (213 gliomas and 24 PCNSLs). Subsequently, radiomics features were extracted following feature selection and training of an XGBoost algorithm for classification. Results: The segmentation models for gliomas and PCNSLs achieved a mean Sørensen–Dice coefficient of 0.82 and 0.80 for whole tumors, respectively. Three classification models were developed in this study to differentiate gliomas from PCNSLs. The first model differentiated PCNSLs from gliomas, with an area under the curve (AUC) of 0.99 (F1-score: 0.75). The second model discriminated between high-grade gliomas and PCNSLs with an AUC of 0.91 (F1-score: 0.6), and the third model differentiated between low-grade gliomas and PCNSLs with an AUC of 0.95 (F1-score: 0.89). Conclusions: This study serves as a pilot investigation presenting an automated virtual biopsy workflow that distinguishes PCNSLs from cerebral gliomas. Prior to clinical use, it is necessary to validate the results in a prospective multicenter setting with a larger number of PCNSL patients.