This paper analyzes the constitutional political economy of Friedrich von Hayek in the context of the well-known contradiction between democracy and liberalism. It is alleged that Hayek at about the same time as researchers from the school of public choice developed the concept of failures of a democratic state, which remains relevant today. Among such failures are subordination to group interests, excessive redistributive activity (growth of the welfare state), legal positivism as a consequence of the unlimited will of the majority. A draft constitutional structure developed by Hayek is considered, aimed at reducing the influence of electoral democracy in order to preserve a free society. The differences in the approaches of Hayek and theorists of public choice to constitutional construction are especially emphasized. For the former, the constitution (despite accusations of constructivism due to the proposed ideal of the constitutional structure) is still a product of evolution. For the latter, it is the result of rational choice under the famous veil of ignorance. The paper shows that Hayek was one of the first to pay attention to formal and informal institutions (moral principles) and showed the crucial role of the latter to characterize the conflict between democracy and liberalism. At the same time, the role of Hayek is noted as one of the first researchers who drew attention to such important aspects of the institutional theory as a competition of institutions and significant restrictions on the international import of institutions due to the impossibility of constructing informal institutions. The final conclusion of the work is that electoral democracy does not destroy constitutional freedoms only if the latter are firmly rooted in public consciousness. Otherwise, their formal proclamation does not mean their guaranteed existence.