The morphogenesis of many enveloped viruses, in which viral nucleocapsid complex interacts with envelope (E) protein, is known to take place at various sites along the secretory pathway. How viral E protein retains in a particular intracellular organelle for assembly remains incompletely understood. In this study, we investigated determinants in the E protein of dengue virus (DENV) for its retention and assembly in the endoplasmic reticulum (ER). A chimeric experiment between CD4 and DENV precursor membrane/E constructs suggested that the transmembrane domain (TMD) of E protein contains an ER retention signal. Substitutions of three nonhydrophobic residues at the N terminus of the first helix (T1) and at either the N or C terminus of the second helix of the TMD with three hydrophobic residues, as well as an increase in the length of T1, led to the release of chimeric CD4 and E protein from the ER, suggesting that short length and certain nonhydrophobic residues of the TMD are critical for ER retention. The analysis of enveloped viruses assembled at the plasma membrane and of those assembled in the Golgi complex and ER revealed a trend of decreasing length and increasing nonhydrophobic residues of the TMD of E proteins. Taken together, these findings support a TMD-dependent sorting for viral E proteins along the secretory pathway. Moreover, similar mutations introduced into the TMD of DENV E protein resulted in the increased production of virus-like particles (VLPs), suggesting that modifications of TMD facilitate VLP production and have implications for utilizing flaviviral VLPs as serodiagnostic antigens and vaccine candidates.