With the increasing connectivity and complexity of modern automobiles, cybersecurity has become one of the most important properties of a vehicle. Various strategies have been proposed to enhance automotive cybersecurity. Digital twin (DT), regarded as one of the top 10 strategic technology trends by Gartner in 2018 and 2019, establishes digital representations in a virtual world and raises new ideas to benefit real-life objects. In this paper, we explored the possibility of using digital twin technology to improve automotive cybersecurity. We designed two kinds of digital twin models, named mirror DT and autonomous DT, and corresponding environments to support cybersecurity design, development, and maintenance in an auto’s lifecycle, as well as technique training. The mirror DT, which displays the external behaviors of the physical object, collects, displays, and analyzes real-time data, for specific purposes like security analysis, anomaly detection, and so on. The autonomous DT models the internal logic of the real-world object, and is applicable for virtual design and debugging, system evaluation, and training in a purely virtual world. We proposed approaches for building the DT models, established a real-virtual interaction environment, and explored several feasible applications. Prototypes were developed to verify the effectiveness and expansibility of the proposed approaches and applications. In summary, DT technology helps engineers to improve work efficiency and effectiveness of cybersecurity design and management activities during the whole product lifecycle. Furthermore, the digital world is also ideal for professional training to help learners to better understand corresponding technics and do more exercises in the virtual world at a low cost.