The invention relates to a construction method and device of a multi-source heterogeneous SQL query engine. The construction method of the query engine comprises the following steps: S1, analyzing metadata of a data source and loading a memory; S2, converting and packaging the SQL grammar corresponding to the data source to obtain a directed acyclic graph class SqlNode, and verifying the SqlNode according to the metadata; S3, cutting the SqlNode to obtain an abstract program Extrace, taking a root node of the SqlNode to form a to-be-executed Sql grammar, and then selecting a corresponding calculation engine; S4, generating java codes required by calculation engine rules on the basis of an abstract program Extrace, and loading the java codes into a memory container; and S5, traversing and optimizing the java code generated in the previous step, converting the java code into a class code, executing the class code, performing data encapsulation, and loading an obtained data result into amemory. According to the invention, the associated query analysis of multi-source heterogeneous data is realized, and the rapid access query analysis requirements of various data sources in a big datascene can be met.