Let D be a fixed non-square integer, and let h(4D) denote the class number of binary quadratic primitive forms with discriminant 4D. Let k be a fixed even integer with \(\gcd (D,k)=1\) . In this paper, using some properties on exponential Diophantine equations with the forms \(X^2-DY^2=k^Z\) and \({X^\prime }^2-D{Y^\prime }^2=4k^{Z^\prime }\) , we prove that if the equation \(a^2-Db^2=8\zeta \) has no integer solutions (a, b) with \(\gcd (a,b)=1\) , where \(\zeta =1\) or 2 according to \(2\not \mid h(4D)\) or \(2\mid h(4D)\) , then the generalized Lebesgue–Nagell equation \((*)\) \(x^2-D^m=y^n\) has no positive integer solutions (x, y, m, n) with \(\gcd (x,y)=1\) , \(2\mid y\) , \(2\not \mid m\) , \(n>2\) and \(h(4D)\mid n\) . By the above result, we can directly derive that if \(D<0\) and \(D\ne -7\) or \(-15\) , then \((*)\) has no positive integer solutions (x, y, m, n) with \(\gcd (x,y)=1\) , \(2\mid y\) , \(2\not \mid m\) , \(n>2\) and \(h(4D)\mid n\) .