We perform X-ray and neutron total scattering measurements on a lithium-rich transition-metal oxide Li1.2Mn0.6Ni0.2O2 with a layered structure as a positive electrode material for a lithium ion battery, in order to reveal local atomic ordering in the samples prepared by different processes. By performing a reverse Monte Carlo modelling using both the real space and reciprocal space data, we can construct three-dimensional atomic configurations, which allows us to extract the quantitative information within and beyond the layers hidden in average structure obtained by crystallography. It is found that Li tends to be surrounded by Mn within the transition-metal layer. Moreover, it is indicated that Ni at the Li layer is preferable around Ni at the transition-metal layer, suggesting that NiO domain is formed. Such a formation of an inactive domain for Li+ diffusion can be suppressed by changing the preparation process, and the improvement of the positive electrode property is confirmed. We can conclude that the real space function obtained by a total scattering measurement is an indispensable tool to detect the formation of the NiO inactive domain, which provides a crucial guideline of preparation process optimization for better positive-electrode property.