Battery materials are of vital importance in powering a clean and sustainable society. Improving their performance relies on a clear and fundamental understanding of their properties, in particular, structural properties. Pair distribution function (PDF) analysis, which takes into account both Bragg scattering and diffuse scattering, can probe structures of both crystalline and amorphous phases in battery materials. This review first introduces the principle of PDF, followed by its application in battery materials. It shows that PDF is an effective tool in studying a series of key scientific topics in battery materials. They range from local ordering, nano-phase quantification, anion redox reaction, to lithium storage mechanism, and so on.