Removal of residual linear energy chirp and intrinsic nonlinear energy curvature in the relativistic electron beam from radiofrequency linear accelerator is of paramount importance for efficient lasing of a high-gain free-electron laser. Recently, it was theoretically and experimentally demonstrated that the longitudinal wakefield excited by the electrons itself in the corrugated structure allows for precise control of the electron beam phase space. In this Letter, we report the first utilization of a corrugated structure as beam linearizer in the operation of a seeded free-electron laser driven by a 140 MeV linear accelerator, where a gain of ~10,000 over spontaneous emission was achieved at the second harmonic of the 1047 nm seed laser, and a free-electron laser bandwidth narrowing by about 50% was observed, in good agreement with the theoretical expectations.