The stability of biologically produced pharmaceuticals is the limiting factor to various applications, which can be improved by formulation in solid-state forms, mostly via lyophilization. Knowledge about the protein structure at the molecular level in the solid state and its transition upon rehydration is however scarce, and yet it most likely affects the physical and chemical stability of the biological drug. In this work, synchrotron small- and wide-angle X-ray scattering (SWAXS) are used to characterize the structure of a model protein, lysozyme, in the solid state and its structural transition upon rehydration to the liquid state. The results show that the protein undergoes distortion upon drying to adopt structures that can continuously fill the space to remove the protein-air interface that may be formed upon dehydration. Above a hydration threshold of 35 wt %, the native structure of the protein is recovered. The evolution of SWAXS peaks as a function of water content in a broad range of concentrations is discussed in relation to the structural changes in the protein. The findings presented here can be used for the design and optimization of solid-state formulations of proteins with improved stability.