The internal mechanism of how maceral and temperature control the mechanical properties of in situ coal has not been established so far. Therefore, this paper aims to discover the control mechanism of macerals and temperature on the mechanical properties of in situ coal. The improved equipment, a heatable triaxial compressor, is applied to obtain the coal hardness and elastic modulus at in situ conditions; heatable depth-sensing nanoindentation is employed to collect the hardness and elastic modulus of macerals at various temperatures. By linking the above macroscopic and microscopic mechanical properties, much information that was hitherto unknown was found, as follows. Both hardness and elastic modulus of macerals adhere to the following order: liptinite < vitrinite < inertinite. Importantly, varying temperatures would not transform the order of the above law, which is an inherent property of macerals. The content increase of liptinite would decrease the hardness and elastic modulus of the whole coal, while the content increase of vitrinite and inertinite would increase the hardness and elastic modulus of the whole coal; the effect of vitrinite is not as remarkable as that of inertinite, particularly. This characteristic could be caused by the difference in aromaticity between macerals. Temperature alters the mechanical properties of in situ coal by the intermediary, macerals, rather than its direct effect. There is a watershed in the effect of temperature on the coal mechanical properties; the effect before this temperature is more significant than that after this temperature. This work is of significant importance to understanding the inhomogeneity of mechanical properties of in situ coal.