Context : X-ray studies of active galactic nuclei ( AGN ) with powerful nuclear winds are important for constraining the physics of the inner accretion/ejection flow around supermassive black holes ( SMBHs ) and for understanding the impact of such winds on the AGN environment . Aims : Our main scientific goal is to constrain the properties of the circum-nuclear matter close to the SMBH in the mini-broad absorption line quasar ( mini-BAL QSO ) PG 1126-041 using a multi-epoch observational campaign with XMM- Newton . Methods : We performed temporally resolved X-ray spectroscopy and simultaneous UV and X-ray photometry on the most complete set of observations and on the deepest X-ray exposure of a mini-BAL QSO ever . Results : We found complex X-ray spectral variability on time scales of both months and hours , which is best reproduced by means of variable massive ionized absorbers along the line of sight . As a consequence , the observed optical-to-X-ray spectral index is found to be variable with time . In the highest signal-to-noise observation we detected highly ionized X-ray absorbing material outflowing much faster ( \upsilon _ { X } \sim 16 500  km s ^ { -1 } ) than the UV absorbing one ( \upsilon _ { uv } \sim 5 000  km s ^ { -1 } ) . This highly ionized absorber is found to be variable on very short ( a few kiloseconds ) time scales . Conclusions : Our findings are qualitatively consistent with line-driven accretion disk winds scenarios . Our observations have opened the time-resolved X-ray spectral analysis field for mini-BAL QSOs . Only with future deep studies will we be able to map the dynamics of the inner flow and understand the physics of AGN winds and their impact on the environment .