In Japan, the theory of illegality was incorporated into tort law and substantive criminal law, following the German legal system. In this paper, we attempt to answer the following questions: What role does the theory of illegality play in the Japanese legal system? Why is the theory of illegality not sufficient to analyse each justification or defence? To answer these questions, we historically analyse the theory of illegality. This paper presents the first part of the analysis. It sheds light on unlawful conduct and the justifications used up to the medieval period, before torts and crimes were clearly divided. The next part of the analysis, presented in another paper, will attempt to illustrate the practical significance of the theory of illegality.