The iterative method which is originally developed before for the three-dimensional cavitating hydrofoils moving with constant speed under a free surface is extended to include the second-order free surface effect into the calculations. The iterative nonlinear method is based on the Green's theorem and allows separating the cavitating hydrofoil problem and the free surface problem. These two problems are solved separately, with the effects of one on the other being accounted for in an iterative manner. The cavitating hydrofoil surface and the free surface are modeled with constant strength dipole and constant strength source panels. The second-order free surface effect is included into the calculations by the technique of small perturbation expansion both for the potential and for the wave elevation on the free surface. The source strengths on the free surface are expressed in terms of perturbation potential by applying first-order (linearized) and second-order free surface conditions. No radiation condition is enforced for downstream and transverse boundaries. Second-order free surface effect on cavitation characteristics and wave elevations is discussed.