Some types of solar flares are observed in X-shaped quadrupolar field configuration. To understand the magnetic energy storage in such a region, we studied non-potential field formation in an X-shaped quadrupolar field region formed in the active region NOAA 11967, which produced three X-shaped M-class flares on February 2, 2014. Nonlinear force-free field modeling was applied to a time series of vector magnetic field maps from the Solar Optical Telescope on board Hinode and Helioseismic and Magnetic Imager on board Solar Dynamics Observatory. Our analysis of the temporal three-dimensional magnetic field evolution shows that the sufficient free energy had already been stored more than 10 hours before the occurrence of the first M-class flare and that the storage was observed in a localized region. In this localized region, quasi-separatrix layers (QSLs) started to develop gradually from 9 hours before the first M-class flare. One of the flare ribbons that appeared in the first M-class flare was co-spatial with the location of the QSLs, suggesting that the formation of the QSLs is important in the process of energy release. These QSLs do not appear in the potential field calculation, indicating that they were created by the non-potential field. The formation of the QSLs was associated with the transverse photospheric motion of the pre-emerged flux and the emergence of a new flux. This observation indicates that the occurrence of the flares requires the formation of QSLs in the non-potential field in which free magnetic energy is stored in advance.