We study two-dimensional integrable field theories from the viewpoint of the four-dimensional Chern-Simons-type gauge theory introduced recently. The integrable field theories are realized as effective theories for the four-dimensional theory coupled with two-dimensional surface defects, and we can systematically compute their Lagrangians and the Lax operators satisfying the zero-curvature condition. Our construction includes many known integrable field theories, such as Gross-Neveu models, principal chiral models with Wess-Zumino terms and symmetric-space coset sigma models. Moreover we obtain various generalization these models in a number of different directions, such as trigonometric/elliptic deformations, multi-defect generalizations and models associated with higher-genus spectral curves, many of which seem to be new.