Differentiation of embryonic stem (ES) cells is a heterogeneous process which is influenced by different parameters, including growth and differentiation factors. The aim of the present study was to investigate the effect of bone morphogenetic protein-4 (BMP4) signaling on differentiation of mouse ES cells to endodermal lineages. For this purpose, differentiation of the ES cells was induced by embryoid body (EB) formation through hanging drop method. During the suspension stage, EBs were treated with BMP4 in a medium containing either fetal bovine serum (FBS) or knockout serum replacement (KoSR). After plating, EBs showed differentiation to a heterogeneous population of specialized cell types. Two weeks after plating, all the experimental groups expressed three germ layer markers and some primitive and definitive endoderm-specific genes. Quantitative real-time PCR analysis showed higher expression levels of Sox17, Pdx1, Cdx2 and Villin mRNAs in the KoSR plus BMP4 condition and higher Gata4 and Afp expression levels in the FBS plus BMP4 condition. Formation of visceral endoderm and derivatives of definitive endoderm was detected in the BMP4 treated EBs. In conclusion, we demonstrated that both BMP4 signaling and serum composition have significant roles in differentiation of mouse ES cells towards endodermal lineages.