Frequent patterns mining is one of the most important tasks in data mining, traditional algorithms usually deal with this problem in simple structured data, but there are so much complex data in reality, for example, the tree type of data, graph type of data, and so on, when investigating these complex structured data, constrains are often needed to be given in order to narrow the search space, however, this will lose some of the useful interesting patterns. In this paper, we present a novel algorithm based on higher-order logic to discover frequent patterns in complex structured data, the novel method can overcome some drawbacks occurring in traditional algorithms. We use Escher, which is a higher-order logic programming language, to discover frequent patterns in complex structured data. Experimental results show that the proposal algorithm is efficient and scalable.