Background: Structural and biochemical studies of mammalian membrane proteins remain hampered by inefficient production of pure protein. We explored codon optimization based on highly expressed Pichia pastoris genes to enhance co-translational folding and production of P-glycoprotein (Pgp), an ATP-dependent drug efflux pump involved in multidrug resistance of cancers. Methodology/Principal Findings: Codon-optimized "Opti-Pgp" and wild-type Pgp, identical in primary protein sequence, were rigorously analyzed for differences in function or solution structure. Yeast expression levels and yield of purified protein from P. pastoris (~130 mg per kg cells) were about three-fold higher for Opti-Pgp than for wild-type protein. Opti-Pgp conveyed full in vivo drug resistance against multiple anticancer and fungicidal drugs. ATP hydrolysis by purified Opti-Pgp was strongly stimulated ~15-fold by verapamil and inhibited by cyclosporine A with binding constants of 4.2±2.2 μM and 1.1±0.26 μM, indistinguishable from wild-type Pgp. Maximum turnover number was 2.1±0.28 μmol/min/mg and was enhanced by 1.2-fold over wild-type Pgp, likely due to higher purity of Opti-Pgp preparations. Analysis of purified wild-type and Opti-Pgp by CD, DSC and limited proteolysis suggested similar secondary and ternary structure. Addition of lipid increased the thermal stability from T m ~40°C to 49°C, and the total unfolding enthalpy. The increase in folded state may account for the increase in drug-stimulated ATPase activity seen in presence of lipids. Conclusion: The significantly higher yields of protein in the native folded state, higher purity and improved function establish the value of our gene optimization approach, and provide a basis to improve production of other membrane proteins. © 2011 Bai et al.