Controlling the preferred direction of the magnetic moments is essential for the design of spintronic devices based on ultrathin films and heterostructures. As the film thickness or the temperature is increased, the easy anisotropy axis is typically reoriented from an out-of-plane direction preferred by surface and interface energy contributions to an in-plane alignment favored by the volume anisotropy terms. We study the temperature-driven spin reorientation transition in two atomic layers of Fe on W(110) using well-tempered metadynamics simulations based on a spin model parametrized by ab initio calculations and find that the transition only takes place in the presence of the Dzyaloshinsky-Moriya interaction (DMI). This demonstrates that the chiral DMI does not only differentiate between noncollinear spin structures of different rotational senses, but it also influences the magnetic orientation of collinear magnetic configurations.