This paper proposes a new test of overidentifying restrictions (called the Q test) with high-dimensional data. This test is based on estimation and inference for a quadratic form of high-dimensional parameters. It is shown to have the desired asymptotic size and power properties under heteroskedasticity, even if the number of instruments and covariates is larger than the sample size. Simulation results show that the new test performs favorably compared to existing alternative tests (Chao et al., 2014; Kolesar, 2018; Carrasco and Doukali, 2021) under the scenarios when those tests are feasible or not. An empirical example of the trade and economic growth nexus manifests the usefulness of the proposed test.