A novel macroporous nanocomposite polymer membrane (NCPM) based on poly(vinylidene difluoride-co-hexafluoropropylene) [P(VDF-HFP)] copolymer was prepared by in situ hydrolysis of Ti(OC4H9)4 using a non-solvent-induced phase separation technique. SEM micrograph shows that the yielding TiO2 nanoparticles are dispersed uniformly in the polymer matrix and there are a lot of spherical macropores connecting with each other by some smaller pores. DSC results exhibit that the crystallinity of polymer matrix decreases with the incorporation of TiO2 nanoparticles. The tensile stress of the NCPM is 9.69MPa and its fracture strain 74.4%. After immersion in 1.0moll−1 LiPF6/ethyl carbonate (EC)–dimethyl carbonate (DMC), the ionic conductivity of the obtained nanocomposite polymer electrolyte (NCPE) is 0.98×10−3 Scm−1 at 20°C. Lithium-ion batteries, which use this kind of NCPE as the separator and electrolyte, display good discharging performance at different current densities, presenting promise for its practical application.