Abstract: The Nekrasov conjecture predicts a relation between the partition function for N = 2 supersymmetric Yang–Mills theory and the Seiberg-Witten prepotential. For instantons on $${\mathbb{R}^4}$$ , the conjecture was proved, independently and using different methods, by Nekrasov-Okounkov and Nakajima-Yoshioka. We prove a generalized version of the conjecture for instantons on noncompact toric surfaces.