We have theoretically investigated ultrafast surface-emitting second-harmonic (SH) generation from mode-locked laser pulses with arbitrary pulse shapes. The spatial dependence of the SH energy density per pulse is almost the same as the temporal profile of the SH power emitted from the entire surface per waveguide width for a long waveguide. For a sinc fundamental pulse, we have obtained, rich and unique, temporal, spatial, and spectral behavior of the second harmonic. We have found that both the temporal and spectral profiles of the emitted second harmonic depend on the location at the surface. These effects can be observed with lasers currently available, and used for auto correlation, in optical signal processing, optical communications, and practical frequency doubling of ultrafast optical pulses with an advantage of no broadening of the SH pulse. We have compared these results with those for a Gaussian fundamental pulse. After introducing saturation intensity to quantify the saturation regime, we have obtained quantitative expression on the second-harmonic intensity in terms of the pump and saturation intensities.