This paper is concerned with an optimal control problem for a forward-backward stochastic differential equation (FBSDE, for short) with a recursive cost functional determined by a backward stochastic Volterra integral equation (BSVIE, for short). It is found that such an optimal control problem is time-inconsistent in general, even if the cost functional is reduced to a classical Bolza type one as in Peng [47], Lim–Zhou [38], and Yong [72]. Therefore, instead of finding a global optimal control (which is time-inconsistent), we will look for a time-consistent and locally optimal equilibrium strategy, which can be constructed via the solution of an associated equilibrium Hamilton–Jacobi–Bellman (HJB, for short) equation. A verification theorem for the local optimality of the equilibrium strategy is proved by means of the generalized Feynman–Kac formula for BSVIEs and some stability estimates of the representation parabolic partial differential equations (PDEs, for short). Under certain conditions, it is proved that the equilibrium HJB equation, which is a nonlocal PDE, admits a unique classical solution. As special cases and applications, the linear-quadratic problems, a mean-variance model, a social planner problem with heterogeneous Epstein–Zin utilities, and a Stackelberg game are briefly investigated. It turns out that our framework can cover not only the optimal control problems for FBSDEs studied in [47,38,72], and so on, but also the problems of the general discounting and some nonlinear appearance of conditional expectations for the terminal state, studied in Yong [73,75] and Björk–Khapko–Murgoci [6].