The article deals with the problem of preventing the deformation of legal consciousness in the conditions of digitalization of education in modern society. The purpose of the work is to analyze the influence of the digital environment on the formation, change, prevention of deformation of the legal consciousness of students and to determine the possibility of using the digital environment in order to prevent deformation of the legal consciousness of students, its modeling, correction, and the need to introduce digital tools into educational organizations to achieve this goal. The article touches upon the main factors that traditional influence of formation and prevention of the deformation of legal consciousness and the role of the digital environment in this matter. In this paper, using analysis and synthesis as the main research methods, studies concerning digital and legal literacy of citizens of the Russian Federation are analyzed. Taking into account the analysis, recommendations are given on the formation of legal awareness and pedagogical prevention of its deformation among students in the conditions of digitalization of society, as well as the need to introduce into the digital environment of an educational organization teaching and upbringing methods aimed at the formation of legal awareness of citizens, their civil position that meets the requirements of the formation of the rule of law and ensuring the development of civil society.The scientific novelty of the work lies in the fact that Russian scientists investigated the issues of legal awareness, prevention of its deformation and digitalization of education, but as independent issues in various branches of sciences: jurisprudence, psychology, pedagogy, sociology, philosophy, etc. In this study, these issues are considered in interrelation and interdependence. As a result of the study, it was found that the digital environment affects the deformation of the legal consciousness of the student and can be used to ensure the prevention of distortion of the perception of legal reality in the educational process. The author offers definitions of such concepts in pedagogical science as: "legal consciousness", "deformation of legal consciousness", "pedagogical prevention of deformation of legal consciousness".