Most proteins function in the cell where macromolecular crowding, confinement and quinary interaction are ubiquitous. More and more researches suggest that the complex cellular environment affects protein's structure and function. Therefore, for protein studies, the closer to native cellular environment, the more likely molecular mechanisms of proteins function could be revealed accurately. In-cell study of protein structure and function has been a frontier topic in protein science. Nuclear magnetic resonance (NMR) spectroscopy is the most promising technique for protein structural and functional assay at atomic level in complex environments. Here, we summarize our recent progress in protein structural and functional studies in macromolecular crowding, confinement, prokaryotic and eukaryotic cells by NMR spectroscopy. Two model proteins, an intrinsic disordered protein a-synuclein and a multi-domain protein calmodulin, are employed to show how macromolecular crowding and confinement affect protein structure and function, respectively. Then in cell NMR methods, including labeling strategy, cytoplasmic viscosity measurement, quinary interaction quantification are developed to obtain high-quality NMR spectra for facilitating protein structural and functional studies in living cells. Ca2+ -induced calmodulin conformational transitions and GB1 protein structural determination in living Xenopus laevis oocytes, are shown here as typical applications of in-cell NMR. Finally, the conclusion and perspective of environmental effects on protein structure and function are presented.