A new type of layered metal phosphide InP3 with porous structure is prepared via high temperature and high pressure synthesis. And then layered porous InP3 nanoflakes are obtained by liquid phase exfoliation, demonstrating broad application prospects in flexible all-solid-state supercapacitors (ASSP). The InP3-ASSP possess outstanding electrochemical performances including high specific volumetric capacitance of 27.2 F cm−3, high power density of 632 W cm−3, high energy density of 3.78 mW h cm−3. Moreover, the as-prepared InP3-ASSP device can operate in a relatively wide temperature range (−25–75 °C), and exhibit excellent stretchability, flexibility and cycling stability. The present work provides a new opportunity for the development of new layered metal phosphide in the field of energy storage.