In this paper, a novel construction of solutions of nonlinear oscillators are proposed which can be called as the quadratic generalized harmonic function. Based on this novel solution, a modified generalized harmonic function LindstedtPoincaré method is presented which call the quadratic generalized harmonic function perturbation method. Via this method, the homoclinic and heteroclinic bifurcations of Duffing-harmonic-van de Pol oscillator are investigated. The critical value of the homoclinic and heteroclinic bifurcation parameters are predicted. Meanwhile, the analytical solutions of homoclinic and heteroclinic orbits of this oscillator are also attained. To illustrate the accuracy of the present method, all the above-mentioned results are compared with those of Runge-Kutta method, which shows that the proposed method is effective and feasible. In addition, the present method can be utilized in study many other oscillators.