An analytical expression for the boundary free energy of the Ising square lattice with nearest- and next-nearest-neighbor interactions is derived. The Ising square lattice with anisotropic nearest-neighbor (Jx and Jy) and isotropic next-nearest-neighbor (Jd) interactions has an order-disorder phase transition at a temperature T = Tc given by the condition e−2Jx/kbTc + e− 2Jy/kbTc + e−2(Jx + Jy)/kbTc(2 − e−4Jd/kbTc) = e4Jd/kbTc. The critical line that separates the ordered (ferromagnetic) phase from the disordered (paramagnetic) phase is in excellent agreement with series expansion, finite scaling of transfer matrix and Monte Carlo results. For a vanishing next-nearest-neighbor interaction Onsager's famous result, i.e. sinh (2Jx/kbTc)sinh (2Jy/kbTc) = 1, is recaptured.