We propose an approach describing correlated electronic systems within the two-particle irreducible functional renormalization-group (2PI-fRG) approach, which uses initial self-energy and the two-particle irreducible vertices, obtained from (extended) dynamical mean-field theory [E(DMFT)]. Using the 2PI-fRG approach allows us to treat both local and nonlocal interactions. In the case of purely local interaction the corresponding equations have similar (although not identical) structure to the earlier developed DMFT+fRG (DMF2RG) approach. In a simplest truncation, neglecting scale dependence of the two-particle irreducible vertices, we reproduce the results for the two-particle vertices/susceptibilities in the ladder approximation of the dual-boson (DB) or the dynamic vertex approximation approach; in more sophisticated truncations the method allows us to consider nonlocal corrections to the self-energy as well as the interplay of charge and spin correlations. The proposed scheme is tested on the two-dimensional standard and extended U-V half-filled Hubbard models. For the standard Hubbard model we obtain nonlocal self-energy, which is in agreement with numerical studies; for the extended Hubbard model we find the boundary of charge instability, which agrees well with the results of the DB approach. We also ascertain that the effect of spin correlations on electron interaction in the charge channel, not considered previously in the DB approach, only slightly reduces critical next-nearest-neighbor interaction of charge instability of the extended Hubbard model at the considered finite low temperature, yielding better agreement with dynamic cluster approximation. The considered method is rather general and can be applied to study various phenomena in strongly correlated electronic systems.