With the rapid development of digital technology, e-learning and robot technology are gradually applied in various fields. As an innovative form of traditional piano education, digital piano teaching is faced with the challenge of how to improve the learning effect and add interest. The purpose of this study is to explore the application of e-learning and virtual robot technology in digital piano teaching, so as to provide an effective teaching method and improve the learning experience and effectiveness of learners. This paper uses e-learning platform and virtual technology software to create a virtual piano learning environment. Through robotics, interaction with learners is achieved to simulate a real piano teacher. Design appropriate teaching content and assessment methods to ensure that learners can fully understand and master relevant knowledge and skills. The results show that the digital piano teaching method using e-learning and robot virtual technology can effectively improve learners' interest and participation, improve their piano playing skills and music understanding ability. Learners give positive evaluation to this new teaching method, and think that it is highly practical and innovative.