With the rapid development of the Internet of things (IoT), flexible piezoelectric nanogenerators (PENG) have attracted extensive attention for harvesting environmental mechanical energy to power electronics and nanosystems. Herein, porous piezoelectric fillers with samarium/titanium-doped BiFeO 3 (BFO) are prepared by a freeze-drying method, and then silicone rubber is filled into the microvoids of the piezoelectric ceramics, forming a unique structure based on silicone rubber matrix with uniformly distributed piezoelectric ceramic. When subjected to external force stimulation, compared with conventional piezocomposite films found on undoped BFO without a porous structure, the PENG possesses higher stress transfer ability and thus boosts output performance. The notable enhancement in the stress transfer ability and piezoelectric potential is proven by COMSOL simulations. The PENG can exhibit a maximum open-circuit voltage (V oc ) of 16 V and shortcircuit current (I sc ) of 2.8 µA, which is 5.3 and 5.6 times higher than those of conventional piezocomposite films, respectively. The PENG can be used as a triggering signal to control the operation of fire extinguishers and household appliances. This work not only expands the application scope of lead-free piezoelectric ceramic for energy harvesting, but also provides a novel solution for self-powered mechanosensation and shows great potential application in IoT.