Engineering laboratory courses have a significant role in building practical knowledge and enhancing the skills of the students. While working in electronics laboratories, students often operate complicated laboratory equipment and juggle through a set of multiple knobs and buttons to configure the equipment(s). It takes a lot of practice to master the skill of operating the laboratory equipment and it becomes difficult for students to operate the equipment without any prior experience. Virtual reality (VR) is the emerging technology and has the potential to provide a better learning experience to the students. In this paper, a VR‐based learning environment (VLE) is developed, which aims to give prior training to the engineering students about the electronics laboratory hardware. An experimental study was conducted to measure the effectiveness of VR on student knowledge development, learning motivation, and cognition. The study was conducted among the 65 engineering students and they were randomly divided into two groups: treatment group (N = 33) and control group (N = 32). The students of the treatment group were taught with the VR approach and students of the control group were taught with a conventional teaching approach. The outcomes of the experiment indicate that VR has a significant positive impact on student knowledge, learning motivation, and cognition. By interacting with the three‐dimensional virtual models of the laboratory instruments, students were able to demonstrate an improved understanding of the laboratory hardware. Also, the treatment group students mentioned that they were not worried about the equipment malfunction that has further enhanced their confidence and reduced the cognitive load.