Nowadays, the microscopic mechanism controlling the distribution of local glass transition temperatures (Tgs) across thin polymer films is still unclear and thus large‐scale applications of polymer films are restricted. Dynamic Monte Carlo simulations are performed to investigate the key factors dominating the distribution of layer Tgs in two kinds of capped ultrathin films with and without attractive polymer–substrate interactions, respectively. For the film without polymer–substrate interaction, the interfacial layer Tg is lower than the middle layer Tg. Additionally, the layer Tgs and the layer segment densities below Tg are linearly correlated, indicating that polymer density determines the distribution of layer Tgs. However, for the films with polymer–substrate interactions, the interfacial layer Tg increases dramatically with the raise of interfacial interactions, while the middle layer Tg decreases slightly. The interfacial layer Tg is proportional to the strength of interfacial interaction, while the middle layer Tg is linearly correlated with the segment density of the middle layer below Tg. Namely, interfacial interaction is the main factor dominating the interfacial layer Tg, while segment density controls the middle layer Tg.