The room-temperature microstructure of the giant magnetocaloric material Gd5Si2Ge2 is investigated using transmission electron microscopy and selected area diffraction. Nonmerohedral twinning is identified and its twin law, which relates one twin component to the other, is revealed. Based on selected area diffraction pattern data, we build a structural model for nonmerohedral twinning and explain its origin in terms of the irregular shear movement of two-dimensional (infinity)(2)[Gd-5(Si2Ge2)] slabs held together by (Si,Ge) dimers.