Cargo proteins of the biosynthetic secretory pathway are folded in the endoplasmic reticulum (ER) and proceed to the trans Golgi network for sorting and targeting to the apical or basolateral sides of the membrane, where they exert their function. These processes depend on diverse protein domains. Here, we used CD39 (NTPdase1), a modulator of thrombosis and inflammation, which contains an extracellular and two transmembrane domains (TMDs), as a model protein to address comprehensively the role of native TMDs in folding, polarized transport and biological activity. In MDCK cells, CD39 exits Golgi dynamin-dependently and is targeted to the apical side of the membrane. Although the N-terminal TMD possesses an apical targeting signal, the N- and C-terminal TMDs are not required for apical targeting of CD39. Folding and transport to the plasma membrane relies only on the C-terminal TMD, while the N-terminal one is redundant. Nevertheless, both N- and C-terminal anchoring as well as genuine TMDs are critical for optimal enzymatic activity and activation by cholesterol. We conclude therefore that TMDs are not just mechanical linkers between proteins and membranes but are also able to control folding and sorting, as well as biological activity via sensing components of lipid bilayers.