The present invention belongs to the field of natural medicine and pharmaceutical chemistry, and specifically relates to novel 2-aminated methylene or 2-esterified methylene tanshinone I derivatives of formula (I) or a pharmaceutically acceptable salt thereof, to a process for the preparation of these compounds, compositions containing such compounds and their use in preparing antineoplastic medicaments. When X is nitrogen, formula I indicates 2-aminated methylene tanshinone I when X is oxygen, formula I indicates 2-esterified methylene tanshinone I.