SummaryPatterning of endoderm into lung and thyroid lineages depends upon a correct early expression of a homeobox domain-containing transcription factor, Nkx2-1. However, the gene networks distinguishing the differentiation of those lineages remain largely unknown. In the present work, by using mouse embryonic stem cell lines, single-cell RNA sequencing, and transcriptomic and chromatin accessibility profiling, we show that knockout of Foxe1 drastically impairs Nkx2-1+ cells differentiation and maturation into thyroid follicular-like cells. Concomitantly, a subset of Foxe1 null/Nkx2-1+ cells have a remarkable ability in vitro to undergo a lung epithelial differentiation program and form lung-like organoids harboring cells transcriptionally similar with mouse fetal airway and alveolar cell types. These results demonstrate, for the first time, lung lineage derivation at the expense of thyroid lineage, by a simple removal of a transcription factor, and provide insights into the intricated mechanisms of fate decisions of endodermal cell types.Highlights- Forward programming of mESCs with transient Nkx2-1 and Pax8 overexpression, followed by c-AMP treatment, leads to differentiation of functional thyroid follicles in vitro;- In absence of Foxe1, thyroid follicle-like structures, derived from mESCs, are scarce and non-functional;- Concomitantly, a subset of Nkx2-1-expressing cells generated from Foxe1KO mESCs spontaneously form lung organoids containing multiple differentiated lung cell types;- ATACseq analyses show higher chromatin remodeling in Nkx2-1-expressing cells in control compared to Foxe1KO cells, especially for genes involved in thyroid maturation and maintenance of the 3D structure of the follicle.