The article analyzes the separate content of the principle of legality and the principle of justice in the consideration and resolution of administrative cases in administrative proceedings. The article identifies shortcomings and problems in establishing the essence of the principle of legality in administrative proceedings, which are related to the lack of differentiation between the content of the principle under study and the principle of justice in administrative proceedings. As a result, the article establishes criteria for the independence and procedural distinctiveness of this principle. To improve the development of administrative proceedings, the article proposes changes to the Code of Administrative Proceedings of the Russian Federation by introducing new provisions.