The liver and pancreas arise from common endodermal progenitors. How these distinct cell fates are specified is poorly understood. Here we describe prostaglandin E2 (PGE2) as a regulator of endodermal fate specification during development. Modulating PGE2 activity has opposing effects on liver versus pancreas specification in zebrafish embryos as well as mouse endodermal progenitors. The PGE2 synthetic enzyme cox2a and receptor ep2a are patterned such that cells closest to PGE2 synthesis acquire a liver fate, whereas more distant cells acquire a pancreas fate. PGE2 interacts with the bmp2b pathway to regulate fate specification. At later stages of development, PGE2 acting via the ep4a receptor promotes outgrowth of both the liver and pancreas. PGE2 remains important for adult organ growth, as it modulates liver regeneration. This work provides in vivo evidence that PGE2 may act as a morphogen to regulate cell-fate decisions and outgrowth of the embryonic endodermal anlagen.