Ectoine and hydroxyectoine as typical representatives of compatible solutes are not only essential for extremophiles to survive in extreme environments, but also widely used in cosmetic and medical industries. Ectoine was traditionally produced by Halomonas elongata through a “bacterial milking” process, of which the marked feature is using a high-salt medium to stimulate ectoine biosynthesis and then excreting ectoine into a low-salt medium by osmotic shock. The optimal hydroxyectoine production was achieved by optimizing the fermentation process of Halomonas salina. However, high-salinity broth exacerbates the corrosion to fermenters, and more importantly, brings a big challenge to the subsequent wastewater treatment. Therefore, increasing attention has been paid to reducing the salinity of the fermentation broth but without a sacrifice of ectoine/hydroxyectoine production. With the fast development of functional genomics and synthetic biology, quite a lot of progress on the bioproduction of ectoine/hydroxyectoine has been achieved in recent years. The importation and expression of an ectoine producing pathway in a non-halophilic chassis has so far achieved the highest titer of ectoine (~ 65 g/L), while rational flux-tuning of halophilic chassis represents a promising strategy for the next-generation of ectoine industrial production. However, efficient conversion of ectoine to hydroxyectoine, which could benefit from a clearer understanding of the ectoine hydroxylase, is still a challenge to date.