Prenatal anterior mediastinal teratomas are rare. Anterior mediastinal teratomas can cause edema during the perinatal period. Color Doppler ultrasonography and chest computed tomography (CT) are of great value in diagnosing neonatal anterior mediastinal teratomas. Here, we report a case of prenatally diagnosed neonatal anterior mediastinal teratoma. After birth, transthoracic echocardiography and chest enhanced CT showed a large solid mass in the pericardial cavity. Owing to compression of the heart, the tumor was completely removed 1 day after birth, and cardiopulmonary bypass was performed. Pathology results indicated an immature teratoma (Grade I). At 9-month follow-up, the patient remained in good overall condition without observed recurrences.