Maintaining lineage restriction boundaries in proliferating tissues is vital to animal development. A long-standing thermodynamics theory, the differential adhesion hypothesis, attributes cell sorting phenomena to differentially expressed adhesion molecules. However, the contribution of the differential adhesion system during tissue morphogenesis has been unsubstantiated despite substantial theoretical support. Here, we report that Toll-1, a transmembrane receptor protein, acts as a differentially expressed adhesion molecule that straightens the fluctuating anteroposterior compartment boundary in the abdominal epidermal epithelium of the Drosophila pupa. Toll-1 is expressed across the entire posterior compartment under the control of the selector gene engrailed and displays a sharp expression boundary that coincides with the compartment boundary. Toll-1 corrects local distortions of the boundary in the absence of cable-like Myosin II enrichment along the boundary. The reinforced adhesion of homotypic cell contacts, together with pulsed cell contraction, achieves a biased vertex sliding action by resisting the separation of homotypic cell contacts in boundary cells. This work reveals a self-organizing system that integrates a differential adhesion system with pulsed contraction of cells to maintain lineage restriction boundaries.