The invention provides a device for improving the quality of the coal by pyrolysis, comprising a rotary drier, a pyrolyzer and a heating rotary kiln. The rotary drier is used for receiving and drying raw coal with granularity being less than and equal to 30mm, and is provided with a sleeve structure to directly change heat between the raw coal and the hot flue gas and indirectly change heat between the raw coal and hot semicoke; the pyrolyzer receives mixture of the dried raw coal and the high-temperature semicoke by a feed line of solid material, directly changes heat between the raw coal and the hot semicoke, pyrolyzes the mixture, and is further provided with a heat clamping sleeve accompanied with high-temperature flue gas; and the heating rotary kiln is used for receiving the hot semicoke from the pyrolyzer and processing the hot semicoke by the means of heating. The device for improving the quality of the coal by pyrolysis has flexible operation, good quality of the generated semicoke and the generated tar, high cascade utilization of energy and high system thermal efficiency, properly solving the technical problems such as dust and tar blocking, high dust content in the tar, etc.