The random fiber laser (RFL) has been an excellent platform for exploring novel optical dynamics and developing new functional optoelectronic devices. However, it is challenging for RFLs to regulate their emission into regular narrow pulses due to their intrinsic randomness. Here, through engineering the laser configuration (cavity Q value, gain distribution and nonlinearity), we demonstrate that narrow (~2.5 ns) pulses with record peak power as high as 64.3 kW are achieved from a self-Q-switched random ytterbium fiber laser. Based on high intracavity intensity and efficient interplay of multiple nonlinear processes (stimulated Brillouin scattering, stimulated Raman scattering and four-wave mixing), an over-one-octave visible-near-infrared (NIR) Raman-frequency comb is generated from single-mode silica fibers for the first time. After spectrally filtering the Raman peaks, wavelength-tunable pulses with durations of several hundreds of picoseconds are obtained. Such a high-peak-power random Q-switched fiber laser and wide frequency comb in the visible-NIR region can find applications in diverse areas, such as spectroscopy, biomedical imaging and quantum information.