Silicon is a promising material for lithium-ion batteries. However, it expands by 300% on lithiation, leading to fracture. Nanostructuring of silicon is expected to be a promising method to improve the mechanical strength of the silicon electrodes. In the present work, a unique battery test cell was designed and fabricated to study the in situ stress evolution in the silicon nanowire (SiNW) electrode during electrochemical lithiation using synchrotron X-ray microdiffraction. The stress in the SiNWs at pristine state and during lithiation was evaluated using energy scans. The average stress in the pristine nanowires was found to be ∼40 MPa tensile, which changed to ∼325 MPa compressive on lithiation. Further, the deviatoric stress state in the SiNWs during lithiation was evaluated using Laue diffraction and the lithiated nanowires were found to be in triaxial stress state with high shear stresses. The technique and the findings provide new and more in-depth understanding of the stress evolution in the SiNWs during electrochemical lithiation