This paper considers adaptive estimation of quadratic functionals in the nonparametric instrumental variables (NPIV) models. Minimax estimation of a quadratic functional of a NPIV is an important problem in optimal estimation of a nonlinear functional of an ill-posed inverse regression with an unknown operator using one random sample. We first show that a leave-one-out, sieve NPIV estimator of the quadratic functional proposed by \cite{BC2020} attains a convergence rate that coincides with the lower bound previously derived by \cite{ChenChristensen2017}. The minimax rate is achieved by the optimal choice of a key tuning parameter (sieve dimension) that depends on unknown NPIV model features. We next propose a data driven choice of the tuning parameter based on Lepski's method. The adaptive estimator attains the minimax optimal rate in the severely ill-posed case and in the regular, mildly ill-posed case, but up to a multiplicative $\sqrt{\log n}$ in the irregular, mildly ill-posed case.