The cell-type-specific function of transcription factors (TFs) is crucial for determining several cellular identities. It is unclear how a single TF can function specifically in different cell types. Here, we define the molecular features that enable OCT4 to reprogram somatic cells into pluripotent or trophoblast stem cells, maintain the self-renewal of embryonic stem (ES) cells, and drive lineage commitment during early embryonic development. Embedded within the intrinsically disordered regions (IDRs) of OCT4, we uncover short linear peptides that are essential for reprogramming (SLiPERs) but dispensable for ES self-renewal. SLiPERs adopt a quasi-ordered state and, during reprogramming, recruit a unique set of proteins to closed chromatin that are unnecessary for ES self-renewal. Interestingly, SLiPERs are not required during early gastrulation but are essential for embryos to develop beyond late gastrulation. Removing SLiPERs leads to aberrant OCT4 binding, derailing the regular transition of ES cells out of pluripotency. Our findings identify modules within IDRs that contribute to the functional versatility and specificity of TFs.