The paper analyzes the dangers faced by man and modern society in the light of the development of artificial intelligence and robotics in the fourth industrial revolution. The author examines the areas of human rights that are threatened by these advances in science and technology in case they are not properly monitored and regulated through legal advances. The historical and regional aspects of legislative regulation of the use of artificial intelligence units and robotics are investigated. Prospects of collision of artificial intelligence units with interests of the person and mankind, and also possible legal mechanisms of the resolution of the conflicts arising between them are analyzed. Using the methodology of comparative law, integration law, international law, analysis and synthesis, the author considers the latest documents of the European Union, EU member States, the United States, Russia, China, South Korea and other most representative countries of the world aimed at effective legal regulation of this promising area of development of modern law. The paper provides an analysis of the main trends in the evolution of modern law of science and technology that affect the life and realization of human and civil rights at the national, supranational and international level and the peculiarities of their legal regulation. The research is carried out on the interdisciplinary combination of elements of comparative law, integration, international and national law with reference to philosophy, sociology, history and prognostics. Conclusions are drawn on the possibility of using the world scientific achievements for the long-term development of the law of the Russian Federation. It is also possible to apply positive foreign experience of legal regulation of artificial intelligence and robotics adapted to the conditions of integration organizations with the participation of the Russian Federation.